Gridview rowupdating method
The Textbox values come back as empty, which is even stranger. Below is the code for both the Grid View HTML and the C# code behind.Code (C# On Updating Event) protected void gv Main_Row Updating(object sender, Grid View Update Event Args e) Gridview HTML Code x WHERE (Rec ID = @Rec ID) " Select Command="SELECT Rec ID, Company ID, Region ID, Country ID, Company Code, Company Name, App ID, Country Code, Country Name, Region Company ID, Region, Model Name, Translate Model, Price, Last Updated On, Last Updated By FROM dbo.But ensure that the control/link is inside the Grid View, only then can we cast sender as Grid View.
you need to use its selected value property, dropdown list is collection of values, but you are assigning a scalar value to your update statements.
AARP_DATA_D1_Bill Matri It still gets the old values, when I loop thru the Dictionary and in debug step thru it I see it still gets the original values not the new values that the user enters when they are changing each item.
// Iterate through the New Values collection and HTML encode all // user-provided values before updating the data source. New Values) guru_sami, sorry it took me so long to get back, I have been off on vacation and just got back, but yes you are right on, I went back and debugged the entire postback and it was rebinding the grid on postback on the page_load event. Veeam is happy to provide a free NFR license for one year.
event is raised when the hyperlink to sort a column is clicked, but before the Grid View control handles the sort operation.
This enables you to provide an event-handling method that performs a custom routine, such as canceling the sorting operation, whenever this event occurs.