-
Datagrid - PageIndex
I have a page with a datagrid on it. When I click on a row of this datagrid, I receive another page where I can edit this record.
After updating this record I want to return to the first page (no problem), but I want the same page on the datagrid (PageIndex).
!! Instead of updating the record, I can also delete it !!
How can I do that ?
-
Re: Datagrid - PageIndex
try keeping your pageindex in a property that is based on ViewState
-
Re: Datagrid - PageIndex
Sorry, can't follow you... :duck:
In my datagrid I created a hyperlink column where I fill in the url format string as "AddEditToepassing.aspx?CodeID={0}" (AddEditToepassing.aspx is my second page where I can modify or delete the record).
Solution ?
-
Re: Datagrid - PageIndex
Ok, found it myself.
For interesting people, you just have to replace the DataNavigateUrlFormatString in the page_load and the datagrid_PageIndexChanged event with something like "....aspx?PageIndex=...".
Of course, in page 2 you need to send the "PageIndex" back.