Asp net gridview rowupdating new values speed dating in columbus ga

Posted by / 01-Dec-2019 12:32

The New Values and Old Values collections are empty..means I can't do anything but display the orginal data again :( Does anyone else have this problem or a solution?

I am using and Array List of my own Objects with public Get/Set methods (c# style).

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.

To finish up then one has to set the Sql Data Source Update Parameters to the desired values.

The syntax for doing so is: Protected Sub GVSupport Info_Row Updating(sender As Object, e As System.

I found that simple data binding of my Drop Down List in my Grid View to my Sql Data Source was not going to be enough.

From this article, you will have a clear view of the Grid View data insert, delete, and update operations.Scenario: I am using the Row Updating Event of the Gridview to do updates because I need more flexibility than the SQLDatasource Update provides.So the problem I am having is that when I get the Datakey value I am trying to get the values in the controls in the Edit Mode of the current row I am trying to update. I am using the Find Control function to get the values from the editing row so I specifically name the dropdownlists and textboxes so I can access them here.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.

asp net gridview rowupdating new values-80asp net gridview rowupdating new values-54asp net gridview rowupdating new values-18

However, when update command button is clicked, the values from the controls were cleared or null.