Click here to Skip to main content
15,890,825 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Ii want to collect value of chekbox which is inside of datagriedview and pass to double each value seperatly. Plz help me. M tried from long time.
Posted

1 solution

Try this:-

protected void btnClick_Click(object sender, EventArgs e)
{ 
	foreach (DataGridViewRow row in dataGridView1.Rows)
        {
           DataGridViewCheckBoxCell chk = row.Cells[0] as DataGridViewCheckBoxCell;

           if (Convert.ToBoolean(chk.Value) == true)
		{
                    //Add code here for adding into array
		}

        }

}
 
Share this answer
 
v2
Comments
Dipika Wani 6-Aug-14 7:41am    
@thanks trushnak, but I want sol for windows form. Find control
Not availble in c#
TrushnaK 6-Aug-14 7:51am    
Now check updated answer..
Dipika Wani 6-Aug-14 14:10pm    
@Trushnak ...hye thanks...
TrushnaK 7-Aug-14 2:46am    
Welcome...
Mark its as answer if it founds helpful to you.. So others also get the 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