hi!
in my datagrid i displaying checkboxes. when user checks the checkbox and click delete link button that all selected rows are deleted. ow to do this. please give a code.
thanks
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
NainilPosted Mar 6, 2010, 2:13 PM
On the click of the link button, you should iterate through the GridViewRowsCollecgtion from the GridView.Rows property and then foreach GridViewRow, use the FindControl("CheckBox") property to find the CheckBox in the row. Once you obtain the CheckBox, you can check to see if the CheckBox is checked or not and then perform your task. I have attached a small sample for illustration purpose. Hope it helps.