Alok Hi aloksinha83, Please see this post: Qin Dian Tang Microsoft Online Community Support Please remember to mark the replies as answers if they help and unmark them if they provide no help.... Text); Unfortunately, it looks like I'm getting the value prior to the edit. Problem getting new value in gridview's Row Updating event I have a dynamically created gridview, it's autogeneratedcolumns is set to True, and it databinds on every postback.Datagrid(1.1) to Grid View(2.0) and using the Row Updating event how to extract the values from the controls. Now, when an user edit a row then click update, I'm having problem getting the new values in gridview's rowupdating event, it always returns the old values. Is this a limitation of creating the grid dynamically? When you are explaining your problem please post any code snippets that will help us understand what you are doing. None of them will retrieve anything but the old data. I just need the data, and I'll then run a stored procedure to update the values, THEN re-query it. The Confirm and Scrap commands all work fine, as do my refresh and display routines. In the future just post the portion of your code that's causing problems. When you do this your data is bound to your grid view and your newly entered information is lost...it's quite a common occurrence to Grid View update problems.
to modify update behavior before it happens, to provide additional handling when an update will occur, to retain a reference to an updated row, to cancel the current update and schedule it for a batch process to be processed later, and so on.
' Assumes that connection is a valid Sql Connection object.
I've tried every method I can find to get the new value for a control, and it's continually coming back as the old method.
The only thing I'm doing differently (I think) is that I'm creating my grid dynamically.
Row Updated = new Sql Row Updated Event Handler(On Row Updated); // Set Data Adapter command properties, fill Data Set, modify Data Set. Fill Error, New Fill Error Event Handler( _ Address Of Fill Error) Dim data Set As Data Set = New Data Set adapter. ' Add a row to table using the values from the first two columns.