So how do you have the Grid View update the database under these conditions?
The secret lies in the event handlers–in this case, the Row Updating event handler. Grid View Update Event Args object that is passed in. This page contains copyright material from //blog.and you have no rights to copy and paste the full text into your own blog even if you have written permission to the contrary.
We have selected four columns from Employee Details table.
If he clicks edit (or) in the edit mode he can be able to see the Textbox.
Using the Row Updating handler, we can do whatever we want. What the line of code says is “cancel any other update processing that may have happened after this event gets called.” From here on out, you’ll need to retrieve the values from your edit controls manually using the Find Contro By ID() method I demonstrated on Monday and updating the database using code. – For a while now I’m trying to figure out why my method, triggered by the Grid View.
The first line of code you need to make sure you include is “e” represents the System. Other places talking about the Grid View and Updating a Row sitecore with gridview – rowupdating event doesn’t fire – gridview to in web.config resolves this issue. Row Updating event, doesn’t work as all samples say it should do.
Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free.
You'll be able to ask questions about coding or chat with the community and help others.