D
DavidC
I have a GridView with a RowDatabound event that checks for a checked
checkbox but for some reason it is not finding it. I tried tracing the code
while debugging but it always came up false even on rows that have the
checkbox checked. Can anyone see what is wrong with the code? The last line
of "If ck.checked ..." is not finding the checked box. Thanks.
If e.Row.RowType = DataControlRowType.DataRow Then
Dim bolUpdate As Boolean = False
Dim dblClearedAmount As Double = 0
Dim ck As CheckBox = e.Row.FindControl("ckReconciled")
Dim tb As TextBox = e.Row.FindControl("txtClearedAmount")
Dim intCheckID As Int32 = _
Convert.ToInt32(DataBinder.Eval(e.Row.DataItem, "CheckID"))
Dim dblClearedAmountDB As Double = _
Convert.ToDouble(DataBinder.Eval(e.Row.DataItem,
"ClearedAmount"))
If ck.Checked Then
checkbox but for some reason it is not finding it. I tried tracing the code
while debugging but it always came up false even on rows that have the
checkbox checked. Can anyone see what is wrong with the code? The last line
of "If ck.checked ..." is not finding the checked box. Thanks.
If e.Row.RowType = DataControlRowType.DataRow Then
Dim bolUpdate As Boolean = False
Dim dblClearedAmount As Double = 0
Dim ck As CheckBox = e.Row.FindControl("ckReconciled")
Dim tb As TextBox = e.Row.FindControl("txtClearedAmount")
Dim intCheckID As Int32 = _
Convert.ToInt32(DataBinder.Eval(e.Row.DataItem, "CheckID"))
Dim dblClearedAmountDB As Double = _
Convert.ToDouble(DataBinder.Eval(e.Row.DataItem,
"ClearedAmount"))
If ck.Checked Then