Click here to Skip to main content
15,922,015 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Note it is windows application.


i have one datagridivew in that i have one checkbox

i am validating whether the checkbox is checked.

for that my code as follows;


Datagridview in run mode as follows;

SNO Day(In check box)

SNO is column o
Day is column 1.


if (Convert.ToBoolean(this.DGVCalendar[1, i].Value) == true)


for that validating i written a above.

my above code is written correct?

Please help me.

Regards,
Narasiman P.

Note it is windows application.
Posted

check this code

if you are looping in datagridview then

C#
for (int i = 0; i < datagridview.Rows.Count-1; i++)
{

               if (Convert.ToString(datagridview[0, i].Value) == "True")
               {
                  //your logic here
               }

}
 
Share this answer
 
v2

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