how to delete a row in a gridview using delete button outside the grid?

笑着哭i 提交于 2020-01-25 11:25:27

问题


i have a grid in which there are various records. On my form i have a Update and Delete button outside the grid. there are different textbox. when i selected a row in a grid its value appear in these textbox from where i can update these value. thats work fine for me. Now i want to delete the selected row? i dont want to delete a record using delete button in the grid. i want when i select a row and press a delete button then the selected row should delete from grid as well from database.


回答1:


I guess if you have already done the update part then you can easily delete the selected row. Just call a delete function, instead of the update one, and then call the DataBind() function of the GridView.



来源:https://stackoverflow.com/questions/6070344/how-to-delete-a-row-in-a-gridview-using-delete-button-outside-the-grid

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!