Gridview rowupdating get boundfield
The key fields are defined in the Data Key Names property of a Grid View control.
Add(New Data Column("Col1_VL", Get Type(String))) dt. Add(New Data Column("Col1_Others", Get Type(String))) dt. Read() '---For each row g_Temp Staff Key = "0" Temp Staff Key = reader("staff_key") 'will not null g_selectstaffkey = Temp Staff Key g_selectpostkey = reader("post_key") g_selectstaffname = RTrim(reader("name_eng")) g_selectpostcode = RTrim(reader("post_code")) Using conn3 As New System. Add(New Data Column("Col1_Shift Type", Get Type(Int32))) dt. Add(New Data Column("Col1_Submitted By", Get Type(Int32))) Dim dr As Data Row While reader. Time Entry Duration Hours FROM dbo.aspnet_starterkits_Time Entry TE inner join dbo.aspnet_starterkits_Project Categories CAT on TE. Category ID inner join dbo.aspnet_starterkits_Projects P on CAT. Time Entry User ID=(SELECT User Id FROM dbo.aspnet_Users WHERE User [email protected] Name)) Source pivot (max(Hours)for DOW in (,,,,,,) ) as pvt" Old Values Parameter Format String="original_" Use the Old Values property (dictionary) to access the original values of the fields in the row to update. Time Entry Date between dateadd(dd, -6, @Week Ending) and @Week Ending) AND TE.protected void Grid View1_Row Updating(object sender, Grid View Update Event Args e) protected void Grid View1_Row Editing(object sender, Grid View Edit Event Args e) protected void Grid View1_Row Canceling Edit(object sender, Grid View Cancel Edit Event Args e) First, I would try Double. The nine lines above those are what I've tried to use after the change to Template Fields.
Here it is: protected You can see three lines commented out (these were yours and worked perfectly with the Bound Fields).
Data Bind() 'Persist the table in the Session object. Close() End Using End Sub (look at the ASPX markup code to see what's the name of your input element name - give it one if it doesn't have) then use the code above to read your element in your grid view event handler.
before that i want just using Find control and casting and then retrieving all lot code. If values are same they could notify user to change the value(give new cell value).
Every one can use it to compare the new value with old ones.
After searching long and hard I found a great article that solved my issue.
How do I get the old values in a gridview row in the row_updating event?