Get newvalues gridview rowupdating

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.

I believe that databinding on every postback is the cause but that's not something that I can change right now, same goes with the autogeneratedcolumns setting.

That probably needs to be linked into the Object Data Source along my Get Products, as well as the Add Products, and Delete Product methods. Problem is, I don't have the time at the moment yet. And back to my original question, how to I get the new value? I have a gridview, go into edit mode, enter a value in a textbox, then click update.

I do have a Update Products method in my business logic class which is ties into the data class. Once I got that in place, the dropdownlist populated. I haven't had many problems with gridview, but this one has thrown me.

On the Gridview Row Updating event, I try to retrieve the value, but I'm getting the value 15. Because I just bound only the Get Products method resultset to the Grid View, it doesn't have the mechanism to handle Updates. But I tried to recreate everything at home, but I missed methods in my DAL class.

This is all started from the Data Tutorial series found on the website. tabid=63Maybe I should look into using the Get Products method with an Object Data Source and see how that works.

I've deleted the datasource and gridview and started again from scratch, but I still get the same problem.

I must be missing something here, but I can't figure out what it is. Datagrid(1.1) to Grid View(2.0) and using the Row Updating event how to extract the values from the controls.Ok This is the settings: I use a Viewgrid with only itemtemplate colums for example. 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. After I click the update button, I change the value to 150. My gridview is not bound to a Sql Datasource or Object Datasource. Thanks The currency manager is in Windows Forms programming. My hunch is that the Sql Data Source and Object Data Source has provisions to tie into an update method/stored procedure. Text); Unfortunately, it looks like I'm getting the value prior to the edit. Let's say the column value is 15 before I click the update button. To String() also, but that might have got me a blank string instead. If you find a solution, or if the above helps, please let me know. My guess is that if you can get the Gridview has a Currency Manager somehow attached, then you can probably get the values from it. I'm in a similar boat...almost the same conditions. NET 1.1 that the datagrid had something called a Currency Manager...it looks like the object still exists in 2.0.

Comments are closed.