Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
685
Webdatagrid with checkboxes
posted

I use a webdatagrid in which i have templated check boxes.  On postback, the webdatagrid does not reflect any of the checking/unchecking done on the client side, but reverts to values from the initial load.  How can I get my code behind to pick up the client side changes?  I'm using IE7.

Protected Sub btnSubmitgrid_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmitgrid.Click

For iCount As Integer = 0 To WebDataGrid1.Rows.Count - 1

Dim cb As CheckBox = CType(WebDataGrid1.Rows(iCount).Items.FindItemByKey("x").FindControl("cbSelect"), CheckBox)
Dim cb1 As CheckBox = CType(WebDataGrid1.Rows(iCount).Items.FindItemByKey("y").FindControl("cbTake"), CheckBox)
Dim cb2 As CheckBox = CType(WebDataGrid1.Rows(iCount).Items.FindItemByKey("z").FindControl("cbDelete"), CheckBox)

Next

End Sub