J
Jim Bayers
I'm having a bear of a time with this. The error is, 'invalid type cast'.
I'm trying to create a checkbox for a datagrid. The check box shows up and
is bound properly, but when I go to update, and read the value from the
checkbox, I get the error. Just what is the 'checked' property type
anyway? I've tried nearly every type.
Dim f1 As String = CType(E.Item.Cells(2).Controls(0), TextBox).Text
Dim f2 As String = CType(E.Item.Cells(3).Controls(0), TextBox).Text
Dim f3 As Boolean = CType(E.Item.Cells(4).Controls(0),
CheckBox).Checked
Dim f4 As String = CType(E.Item.Cells(5).Controls(0), TextBox).Text
Is there an easy way to tell the type of something?
I'm trying to create a checkbox for a datagrid. The check box shows up and
is bound properly, but when I go to update, and read the value from the
checkbox, I get the error. Just what is the 'checked' property type
anyway? I've tried nearly every type.
Dim f1 As String = CType(E.Item.Cells(2).Controls(0), TextBox).Text
Dim f2 As String = CType(E.Item.Cells(3).Controls(0), TextBox).Text
Dim f3 As Boolean = CType(E.Item.Cells(4).Controls(0),
CheckBox).Checked
Dim f4 As String = CType(E.Item.Cells(5).Controls(0), TextBox).Text
Is there an easy way to tell the type of something?