Last post Sep 23, 2011 06:26 AM by bhushan.cdi
Sep 21, 2011 03:56 AM|bhushan.cdi|LINK
I have a gridview control in page.
I set it's editindex on event "grdViewEditing" TO Current selected grdrow.
Problem is when gridview is in updating state i.e. it's editindex set to a value other than -1 and now i refreshes the page by F5 the grdview.editindex value automaticaly set to -1. This i checked in pageload event.
why this happing?
Sep 21, 2011 07:47 AM|Akhilesh S|LINK
Since you are refreshing the page, the browser sends the previous request to the server. i.e. it calls the GridView_Editing event where you set the EditIndex. So in Page_Load it will be -1 but your GridView_Editing event will set it back to the current selected
grid row index.
Sep 21, 2011 10:52 AM|sridhaar.sree|LINK
In pageload add place all the code in the Postback condition following code
// Do all the logic
Mark as Answer if it helps. So that others can not waste their time
Sep 23, 2011 06:26 AM|bhushan.cdi|LINK
Yes your answer is write, But when i insert breakpoint at gridview_editing event it will not hit there after pageload.
This means after page refresh it will not call gridview_editing event.