Here I have taken
Gridview
in the design by using the
Gridview
task add new column I have generated delete,update,insert buttons by using the
DataSource
.
I have written command for delete,update,insert as -
DeleteCommand="DELETE FROM Empdetails WHERE (Empname =raghu)";
And
UpdateCommand="UPDATE Empdetails SET Empid = 1865201, Empname = 'Reddy' WHERE (Empid = 1865200)"
By doing this it is deleting,updating only particular
Empid
, but I need code for deleting all the records,and updating all the records where we click the update any button in the row of
Gridview
.
The code which I need is only for in
Gridview
delete,update ,insert buttons.
For example here - Gridview in this
empname|empid|city|
raghu |18652|hyd| Delete(button)|Update(button)|insert(button)
ram |1547 |hyd|Delete(button)|Update(button)|insert(button)
Like I have records and delete,update,insert buttons.
Here I need code for only clicking the update in every row it should update, similarly delete ,insert buttons also.