Update not refreshing Gridview
Posted on 2016-08-01
I have a gridview user control on a page. On the page the control is on, I wrapped an UpdatePanel around the gridview with UpdateMode="Conditional" ChildrenAsTriggers="true" and my Trigger is a click of a DataList that does a populate of the gridview.
I also have an Edit Button and when I click it the row goes into EditMode (EditIndex = e.NewIndex) and when I update a field and click Save the RowUpdating event fires, I update my table and I set the EditIndex = -1 but this does not populate with new values, only the old values.
I have tried to do a DataBind after the setting of the EditIndex = -1 but it does not help. I also tried to DataBind on the RowUpdated event but that didnt work either?
Any help would be appreciated and I have put the code below...