Gridview rowupdating e newvalues null

event is raised when a row's Update button is clicked, but before the Grid View control updates the row.This enables you to provide an event-handling method that performs a custom routine, such as canceling the update operation, whenever this event occurs. If so, I suspect you do a Data Bind before the Update happens. Please remember to click “Mark as Answer” on the post that helps you.I'm trying to access the Selected Data Key or the Selected Value (to get the key) in my "Grid View1_Row Updating" event (I'm manipulating the data the user typed in BEFORE it gets saved to the database) Both of these objects are returning null. I noticed that these parameters will only return the first key of a compound key, per this thread: Post.aspx? fyi, I am doing LEFT JOIN on a bridge table (containing the product_uid and category_uid)with my "products" table. I would have expected the two keys to be picked up. Item( It is only the Old Values object that contains 'nothing', the New Values passed the values correctly.Thank you for any insight you can offer in advance. When all you've got is a Hammer, Every Problem looks like a Nail. Output: Main Content_detail GV22_ctl02_0#0 - System.

Regards, Mike Hello Linjun, Thank you for your response.I confirmed this using Reflector: protected virtual void On Row Updating(Grid View Update Event Args e) { bool flag1 = base. Is Bound Using Data Source ID; Grid View Update Event Handler handler1 = (Grid View Update Event Handler) base. This allows you to provide an event handler that performs a custom routine, such as canceling the update operation, whenever this event occurs.A Details View Update Event Args object is passed to the event handler, which allows you to determine the index of the record being updated and to indicate that the update operation should be canceled.

Leave a Reply