This line of code references a checkbox in a Gridview, how can I assign the value of the check box 1 or -1, I think it is for checked or unchecked, to a variable so that I can run an if statement against it, and change it to True or False?
dt.Rows(row.DataItemIndex)("DisplayString") = (CType((row.Cells(3).Controls(0)), CheckBox)).Checked
Try this:
Edit
I’m not sure I completely understand what it is you are trying to do?
Are are you are attempting to check/uncheck the CheckBox based on the values 1 or -1?
Could you elaborate please?