sconard Posted June 23, 2009 Posted June 23, 2009 I have a datagrid that has a checkbox column defined: </asp:TemplateColumn> <asp:TemplateColumn HeaderText="Email" Visible="True"> <ItemTemplate> <asp:CheckBox ID="cbEmailed" Runat="server"> </asp:CheckBox> </ItemTemplate> </asp:TemplateColumn> I have a function (called on page load for testing) to check for the values as changed by the user: For Each dgi In myDataGrid.Items Dim myCheckbox As CheckBox = CType(dgi.Cells(6).Controls(1), CheckBox) If myCheckbox.Checked Then 'do the work End If Next This function never shows values changed by the user. Only the values as set originally by databind of the grid. For Each dgi In myDatagrid.Items Dim myCheckbox As CheckBox = CType(dgi.Cells(6).Controls(1), CheckBox) If CBool(getChecked(CInt(dgi.Cells(0).Text), jobId)) Then myCheckbox.Checked = True Else myCheckbox.Checked = False End If Next I have confirmed that the databind is not called prior to the check of existing values. Any ideas as to why and examples as how to fix? Thanks Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.