I have tried to add an event handler to the Row Updated event of my custom control but it is not called.
I have tried to override On Row Updated in my custom control, but the breakpoint never gets hit.
To avoid this we need to keep the property Read Only as false, Then in the edit mode nothing will happenes. The reason I use Template Field instead of Bound Field is that, it is very easy to grab those controls in the codebehind if we user labels or textboxes.
In case of the bound field’s we need to check what column it is and need to use index of that cloumn, which is little hard and even in future if we change the column order If you see the Last Template Field part in the above code, I am using the link buttons for edit, update, delete and cancel.
So what you need to do is store the data source (maybe in Session) and only bind rebind the data when you absolutely need to (Like during the Is Not Post Back) Do you understand?