K
Kirk
I have a GridView that displays several columns, one of which is a
checkbox field. This is populated at runtime from a SqlDataSource and
is not enabled (the user can't change it's value). I have turned on
the "Enable Selection" option, and I know I can identify what is the
currently selected row.
How can I get the value [True/False] of the checkbox in the selected
row? For columns that are just text, this works:
System.Diagnostics.Trace.WriteLine(Me.GridView1.SelectedRow.Cells(3).Text)
...but it does not work on a column that is a checkbox (returns
nothing
since there is no text in that column). I have tried to use the
Ctype
method to cast the column as a checkbox, but I can't get that to work
either.
I realize that I am missing something stupid, and I would appreciate
a
tip or suggestion.
Thank you!
checkbox field. This is populated at runtime from a SqlDataSource and
is not enabled (the user can't change it's value). I have turned on
the "Enable Selection" option, and I know I can identify what is the
currently selected row.
How can I get the value [True/False] of the checkbox in the selected
row? For columns that are just text, this works:
System.Diagnostics.Trace.WriteLine(Me.GridView1.SelectedRow.Cells(3).Text)
...but it does not work on a column that is a checkbox (returns
nothing
since there is no text in that column). I have tried to use the
Ctype
method to cast the column as a checkbox, but I can't get that to work
either.
I realize that I am missing something stupid, and I would appreciate
a
tip or suggestion.
Thank you!