Reputation: 10354
I have one GridView and one "Add" Button. If I click the "Add" button, one new row will be added to the GridView at the sametime I want to show "Update and Cancel" buttons in CommandField Column. When I click the Update Button after the Insertion of the New Row, I want to Show the Delete Button in the Command Field Column. Once again When I click the Delete Button, the Corresponding row will have to be deleted.
So far I have done all the four things(update, cancel, edit and delete) at the same. But now I dont want Edit. The problem is when I include "ShowDeleteButton = True" in the command field, the "update and cancel" buttons are not displaying when I click the "Add" button. The "update cancel" buttons are displaying only when I include "ShowEditButton = true". But I dont want to Edit the Column. Any one please help me.
Here I want only to do Update, Cancel and Delete. How to do? I dont want coding, I have written all the coding parts in Gridview_Rowupdating and RowDeleting Event.
Here is my GridView's Command Field Column.
Upvotes: 0
Views: 19056
Reputation: 52241
have is good article to explain step by step http://www.aspdotnetcodes.com/GridView_Insert_Edit_Update_Delete.aspx
http://www.codeproject.com/KB/aspnet/InsertingWithGridView.aspx
Upvotes: 2