A
Angel
I have placed a ASP.NET Checkbox in my EditItemTemplate for a particular
column.
<EditItemTemplate>
<asp:CheckBox ID="diRejectStatus" Runat="server" Checked='<%#
CheckVal(Container.DataItem("RejectStatus"), "False") %>'>
</asp:CheckBox>
</EditItemTemplate>
When I click the Edit button to edit the record I uncheck the checkbox
column of the record. When I hit the update for the row, I correctly get the
Control for the record in the Update Event for the Grid
Sub dgStatusMapping_UpdateCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
dgStatusMapping.UpdateCommand
Dim chkReject As CheckBox = CType(e.Item.FindControl("diRejectStatus"),
CheckBox)
but when I check the value of the checkbox, it is returning the original
value of the checkbox
If Not chkReject Is Nothing Then
bolRejectStatus = chkReject.Checked
End If
In other words the checkbox Checked Value still has the original value and
not the value I just changed it too.
Does anyone know how I can get the new value of the checkbox without
performing a postback on the page everytime I click the checkbox?
column.
<EditItemTemplate>
<asp:CheckBox ID="diRejectStatus" Runat="server" Checked='<%#
CheckVal(Container.DataItem("RejectStatus"), "False") %>'>
</asp:CheckBox>
</EditItemTemplate>
When I click the Edit button to edit the record I uncheck the checkbox
column of the record. When I hit the update for the row, I correctly get the
Control for the record in the Update Event for the Grid
Sub dgStatusMapping_UpdateCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
dgStatusMapping.UpdateCommand
Dim chkReject As CheckBox = CType(e.Item.FindControl("diRejectStatus"),
CheckBox)
but when I check the value of the checkbox, it is returning the original
value of the checkbox
If Not chkReject Is Nothing Then
bolRejectStatus = chkReject.Checked
End If
In other words the checkbox Checked Value still has the original value and
not the value I just changed it too.
Does anyone know how I can get the new value of the checkbox without
performing a postback on the page everytime I click the checkbox?