Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Next/Previous Record functionality
Message
From
21/07/2008 12:46:39
 
General information
Forum:
ASP.NET
Category:
WebForms
Miscellaneous
Thread ID:
01332795
Message ID:
01332849
Views:
6
>Hi All,
>
>I have an ASPX page with the GridView control. The grid control includes the CommandField in order to allow user to be redirected to another page for editing purposes. The RowCommand event captures the row selected and stores its primary key into the Session variable.
>
>Now I also need to capture the Next and Previous (if exists) row's primay key field. How would I go about capturing this data?
>

Try :
GridView1.Rows[GridView1.SelectedRow.RowIndex-1]
to get the previous, similar to get the next. But you'd need to check the RowIndex against the row count first to make sure the next/previous would be valid....
Previous
Reply
Map
View

Click here to load this message in the networking platform