How to update row in gridview?

How to Update, Delete and Cancel a row in gridview asp.net?

  • 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.

  • Answer:

thevan at Stack Overflow Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.