Onrowupdating not working
Storing datatable in View State is not a good practice as it increases the size of your page and reduces the performance, also View State can be deciphered on the client side, so the Data Table is not secure.I removed everything I did with View State and edited the original post again with what I currently got. I cannot sort the Grid View because I'm trying to sort with Your code doesn't have Data Source ID. I have tried to not override in control and instead use delegates like I described in ...I am using a SQLData Source to populate my gridview in ASP. When I hit Edit, the textboxes appear and I am able to edit my values. I am using a SQLData Source to populate my gridview in ASP. When I hit Edit, the textboxes appear and I am able to edit my values. In the Row Editing function, the edit textboxes appear and I can get the "old" values Then the page renders, I edit the textboxes and hit Update. Here its mentioned that th line should be like this: txt Symbol = ((Text Box)(gv. i know its not an answer to what you are asking, but for the next time it would be a lot more easier to use the entity framework and bind it to the grid... I have set the requisite attributes in the Grid View tag.
My problem lies in that the click on the Update Image Button posts back, but neither the Row Command nor Row Updating events get triggered.
Apologies, I was wrong about that and was thinking of something different - Show Update Button not in the Grid View control because its behaviour (along with Cancel) is automatic based on the Edit button. (I've deleted my comment because it's noise).
protected void gv Contact Info_Row Editing(object sender, Grid View Edit Event Args e) protected void gv Contact Info_Row Updating(object sender, Grid View Update Event Args e) protected void gv Contact Info_Row Canceling Edit(object sender, Grid View Cancel Edit Event Args e) Label lbl = ((Label)gv Contact Info. Set a debugger at the beginning of the event fired, walk through it step by step, and see if the value is updating at the spot where you're expecting.
This works as expected and I can put a breakpoint in the Row Command event handler to see the "Event" command name.
After it has been clicked the postback places that row in edit mode. At this point in time the above Edit Item Template is displayed with two Image Buttons within it.