To String() Dim str Last Name As String = Direct Cast(Grid View1. Text Dim command As Sql Command = New Sql Command("updatetest", cn) command. I have code trying to pull the values from the text boxes, but it still pulls the old values.
Since you are not using the datasource controls(which is a good thing), the Old Values and New Values collections will not be populated automatically. To cancel the update operation, set the Cancel property of the Grid View Update Event Args object to .You can also manipulate the Keys, Old Values, and New Values collections, if necessary, before the values are passed to the data source.I have a Grid View control and use old style manual binding with a Data Source property and invoke the Data Bind() method. If you don't use one of the Data Source controls, you are required to handle the Row Updating event.