Delete gridrow using checkbox and delete button

Posted by Manimaddu under ASP.NET on 8/11/2014 | Points: 10 | Views : 326 | Status : [Member] | Replies : 2
How to delete grid row using check box and delete button in asp.net c#

Thanks in advance.

Thanks & Regards,
Mani Kumar



Responses

Posted by: Bandi on: 8/11/2014 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Refer
http://aspsnippets.com/Articles/Delete-multiple-rows-in-GridView-with-CheckBox-selection-and-with-confirmation-in-ASPNet.aspx

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Manimaddu, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naveenhcl on: 9/3/2014 [Member] Starter | Points: 25

Up
0
Down
Hi,

Your question is not clear but as per my understand the post You need to delete the gridview rows based on checkbox selection right.?

If you are looking for the same then refer below sample code

protected void btnDelete_Click(object sender, EventARgs e)
{
foreach(GridViewRow row in Gv.Rows)
{
CheckBox chk=(CheckBox)row.FindControl("chk");
if(chk.Checked)
{
//perform delete action on here.
}
}
}


Manimaddu, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response