Click here to Skip to main content
15,904,416 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
checkall-checkbox-gridview-aspnet
I am almost trying to do as in the link shown above..but my requirement is to update all rows in column firstly by filtering the rows by selecting required rows using 'checkbox' & then on a 'button_click' logic..!!

Hope you all got my requirement and improvements. Suggestions are mostly welcomed..Thank you!!.
Posted
Updated 11-Feb-13 23:12pm
v2

1 solution

Loop through the gridview rows and find the checkbox. If your checkbox is checked then update the datatable. Try this:
C#
foreach (GridViewRow row in grid.Rows)
{
   if (((CheckBox)row.FindControl("chkboxid")).Checked)
   {
       //read the label for id and according to the ID update the datatable
   }
}



--Amit
 
Share this answer
 
Comments
sri67 13-Feb-13 5:37am    
@Amit ji: By looping I could update individually..but I need to update the checked rows all at once by taking user input only once.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900