Update Checkbox Column in WebGrid

Discussion in 'ASP .Net Web Controls' started by Angel, Nov 23, 2005.

  1. Angel

    Angel Guest

    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?
    Angel, Nov 23, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. miqbal
    Replies:
    1
    Views:
    1,733
    Anatoly
    Jul 17, 2003
  2. Infragistics - WebGrid

    , Jul 19, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    2,665
    Aaron Corcoran
    Jul 19, 2005
  3. Don

    Infragistics webgrid

    Don, Oct 19, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    589
    Guadala Harry
    Oct 20, 2005
  4. NuB

    infragistics webGrid

    NuB, Oct 28, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    3,054
  5. Oliver Orsteck

    Display one value but store another [WebGrid]

    Oliver Orsteck, Nov 22, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    489
    Oliver Orsteck
    Nov 22, 2005
Loading...

Share This Page