We can achieve the same functionality using Datakeys.

gridviewupdateeventargs rowupdating-69

New Values only apply to native bound gridview controls.

I have a Grid View control and use old style manual binding with a Data Source property and invoke the Data Bind() method.

NET Architecture MVP (Microsoft Most Valuable Professional) works as an Architect Consultant and provides consultancy on how to design and develop Web applications.

Suprotim is also the founder and primary contributor to Dev Curry, Dot Net Curry and SQLServer Curry.

I don't know how to get the value of the new value of edited item: label, textbox, or ddl. I have not found any sample or solution or thread posting to solve this. Cisco Cylk, I read what you wrote in this post and it leads me to believe that you didn't check out or check out *fully how I was able to do what you want to do .what I marked as "Answer" on this post, I'll post here: For Label1 (in the Edit Item Template, you use Eval -- that means it's read only. Because it is the first field, it will show up as new Values[0].

I like to grab control values in Grid View_Data Bound(), which occures just after the controls are bound. Are you trying to get the value of a Label in a template field of a gridview? I know how to find a control under a template field from a grid view, and get its value. To String(); } Since the value uses Bind it will now be read/write.

Place Link Button Edit in Item Template and Link Button Update and Cancel in Edit Tamplate of Gridview's column. Fire Grid View's Row Editing event for Link Button Edit. Fire Grid View's Row Updating event for Link Button Update. Fire Grid View's Row Canceling Edit event for Link Button Cancel. Set Command Name propery of Link Buttons according to their respective event. Set Grid View's Data Key Names Property to record ID (ID=Primary/Unique key of student table) 7.

A datakey represents the primary key field or field of a record that can uniquely identify it in a data-bound control. Row Index represents the index of the particular row.

I just selected the Auto Generated Edit Button and Auto Generated Delete Button properties to True in the properties tab for the grid. Took 15 minutes to change it, my code is half if not less than it was before, and all I worked hard for now just works straight forward.