Getting new value gridview rowupdating event
It doesn't look like its possible to retrieve new values if there is a gridview without datasource. Please remember to use [code] tags when you post code. 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. -Frinny I had exactly the same problem and finally with my colleague's help we found the mistake.Can someone please translate this for me from C# to VB. I was doing databinding in my Page_Load event and when I clicked "Update" the Post Back was done, so was the Page_Load event fired. The only thing I'm doing differently (I think) is that I'm creating my grid dynamically.
There must be something fundamentally wrong that some of us are doing that is causing this and the fact that it's not happening to others, and they don't know the solution. this only works when the databind happends after the updating. My suggestion to you would be to either subclass gridview, and expose the Extract Row Values though a public method or stick everything you need in Data Keynames. Extract Values From Cell(dict Values, dcfc Cell, gv Row. Row State, True) End If Next control Dim return Values = New Dictionary (Of String, Object )() For Each de As Dictionary Entry In values return Values(CStr(de. Value Next de Return return Values End Function I appreciate your quick and prompt reply, which I looked at from home last night, but was not able to test it until just now, and really the only different was adding the Try Cast. You're trying to extract the values from the edit row right?
Upon modifying the values in textbox which come from Edit Item Template , the new values dont show in the event handler rowupdating(), instead I get the values which appear when the page was rendered.
How do I grab the new values from these textboxes and proceed further?
I was just testing if I will get the changed value out of the textbox when updating with no luck.
"test" will appear in label not "asd" as I would want to.
I can't get this to work and I was hoping this would solve my problem trying to update a gridview without datasource. Grid View was filled with the old values again, so in my Grid.