Net gridview rowupdating event
Delete a Record We can delete a record from the database table by clicking on the delete button that is in the Delete column of the Grid View.
We first of all create a Stored Procedure that gets the Id of an employee as a parameter from the Grid View on whichever row the user clicked. In this event, first we get the datakey value that is the id of an employee of whichever row the user clicked and that id is passed as a parameter to the Stored Procedure. According to the above, in these three operations we use three events of the Grid View for each operation.
You can find the textbox that is generated on edit event in the Row Updating event below and assign it to a string variable.
Free counters Added on January 19,2012 Follow Me @vmsdurano A bit About Me Disclaimer The opinions expressed herein are my own personal opinions and does not represent the opinions of my employers.
Nor does it represent the opinion of my dog, because I don’t have one.
Then have a seperate function to update the values entered and finally call your Bind Grid() function which again binds the gridview..
Note: I'm using stored procedure to update my DB table.
Search for net gridview rowupdating event:
You can use both "Bound Fields" & "Template Fields" now.