asp.net - Dynamic gridview delete button not showing -


I have an ASPX page which is dynamically creating a gridview from a database table. Every time the gridview is created on postback, I set the deletebutton attribute for auto to true. However, the gridview deletion button is not being displayed for the first time. I've written the value of AutoGenerateDeleteButton and it's true when I add a second line to the gridview, then the Delete button shows again. any suggestion?

Did you initially remove binding events, then you are building a gridview?

If so, any control that is created during the binding events of Gridview will not be removed, which explains why the deleted button is not being displayed.

Just as an explanation: Your question really tells that the deleted buttons are appearing for the first time both and the second time. I am assuming that this is the first time that it is not being displayed?


Comments