Gridview rowupdating event not handled
A couple of days ago I mentioned a project that I’ve been working on that is a bit out of the ordinary as far as Grid Views go.
One of the issues I’ve had is that the edit template doesn’t map to the view template very well. You see, the data that gets stored back to the database during the edit could go to two of four different tables.
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.
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.
On the first step of the wizard click on "New Connection" button to open a dialog as shown in Figure 1.
Enter the database details as per your setup and click on OK.
Here, we set the Data Source of the Grid View to Sql Data Source1. We also enable paging, sorting and editing features of the Grid View.
Suppose if we are trying to hide primary key of our table, there is actually no need to hide. In the above Snippet you are seeing a label in Item Template that means whenever we are showing Grid View to the user Label will be visible to the user.
May be you may think why am I using link buttons as we are provided with some command field buttons by Grid View.