Avatar of lapucca
lapucca
 asked on

How to get if my gridview control's checkbox cell is checked?

Hi, I'm using VS2012.
In the row updating event, I need to see if user checked the checkbox.  In the gridview, 1st column is the auto generated Edit.  4 columns to the right is my checkbox column.  What index should I use, 4?  (edit button is 1?)  and code like this?
 dt.Rows[row.DataItemIndex]["IsComplete"] = ((CheckBox)(row.Cells[4].Controls[0])).Checked;

Also, what is the Controls[0]?  What index is it referring to with 0?

Thank you.
C#ASP.NET

Avatar of undefined
Last Comment
lapucca

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Michael Fowler

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
lapucca

ASKER
Thank you
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes