Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Update Checkbox Column in WebGrid

Reply
Thread Tools

Update Checkbox Column in WebGrid

 
 
Angel
Guest
Posts: n/a
 
      11-23-2005
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?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
infragistics webGrid NuB ASP .Net 2 10-28-2005 05:59 PM
Infragistics webgrid Don ASP .Net 1 10-20-2005 01:01 AM
Infragistics - WebGrid kapluna@rose-hulman.edu ASP .Net 3 07-19-2005 07:23 PM
Convert an MS Access Yes/No column to a checkbox column in C# datagrid Gregory Rampton ASP .Net Datagrid Control 0 08-06-2003 04:09 PM
Infragistic webgrid Column collection miqbal ASP .Net 1 07-17-2003 07:08 AM



Advertisments