Last post Oct 03, 2015 11:45 PM by abrly
Oct 03, 2015 05:00 PM|bobbobbobbobbobbob12|LINK
I know how to create a gridview and bind it to a datasource but 2 questions.
1) How can I add a delete button to the grid and when the button is clicked run a stored procedure to remove the information from the grid. Also a
2) How can I in the footer add a drop down list, bind it to a data source and on the selected index changed event of the drop down list run an insert statement then rebind the grid?
So my set-up wouldbe like so
Animal ---- Remove
Bird ----- Delete
Cat ------ Delete
Dog ---- Delete
Frog ---- Delete
Add: (drop down list here with animals)
Oct 03, 2015 11:45 PM|abrly|LINK
1. you need add a template column at the end where you can put a button inside and set command name and command argument etc , you can
process that clicked event in grid view's row command event and do required things there.
2. Enable footer in gridview and add any control there at row data bound event as below example