Click here to Skip to main content
15,922,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all.......

i used mysql as datasource and i added one table to grid view and also added check box as item template here my problem is i need to find which one is selected and which check box is not selected can any one please help me





thanks in advance
Posted

i guess first you need to access to checkboxes use this similar code just change names

Label lbl = DataList1.Items[0].FindControl("Label14") as Label;


try this one for each checkbox than do the if(checkbox.selected)
 
Share this answer
 
Lets say on a button click event, just loop though the grid rows. Use findControl to get the checkbox control from current row. Once found, check for the 'checked' value. Based on it, you can write your logic. Try!
 
Share this answer
 

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