Rowupdating event in gridview funny dating application questions
For a while now I’m trying to figure out why my method, triggered by the Grid View.
Row Updating event, doesn’t work as all samples say it should do.
When we edit a row in our Grid View and press the “Update” button, at some time it’s received in the Row Updating method.
But as I noted in the comments in that method, some collections that should contain the columns (names, old values and new values) are always empty. And the Row Updated method is never even touched!!! NET Forums that I need to use a Data Source control.
So first we need to move to an updateable row record in the Text Box.
To do that we need a Row Editing event of the Grid View.
The problem is, I’d very much like to do so, if ASP. But I can’t set a Data Source property or anything on the Sql Data Source!!! I probably have to read the cells on the Grid View of the selected row, find the controls, get the values from those and insert those into my Data Set.Here we can update Name, Emp_Code and Emp_Age fields depending on the Id field of the "EMPLOYEE" table.Create SQL Connection We need a connection with a Microsoft SQL Server database so we can access data and perform an operation on it.We get the Id value using the row index and another Text Box value is also retrieved.All updated values are passed to the Stored Procedure.