Hi,
I have a grid, which contains some Checkbox columns.
In the SelectedIndexChanged event on the server, I am trying to read the checked status of the checkbox columns.
I have tried several different variations to get this, but I seem to be banging my head against a wall.
I'm sure this is fairly striaght forward, but I can't see where the problem lies, and I can't find an example of what I am trying to do.
Below are the different things I have tried - all of which give me a Null value exception.
All suggestions greatly appreciated.
Grid name is BaysGrid, Markup for the specific column is:
Thanks
Paul
I have a grid, which contains some Checkbox columns.
In the SelectedIndexChanged event on the server, I am trying to read the checked status of the checkbox columns.
I have tried several different variations to get this, but I seem to be banging my head against a wall.
I'm sure this is fairly striaght forward, but I can't see where the problem lies, and I can't find an example of what I am trying to do.
Below are the different things I have tried - all of which give me a Null value exception.
All suggestions greatly appreciated.
Attached = ((System.Web.UI.WebControls.CheckBox)BaysGrid.SelectedItems[0].FindControl("bgAttached")).Checked;Attached = ((System.Web.UI.WebControls.CheckBox)(BaysGrid.MasterTableView.GetSelectedItems()[0].Controls[0].Controls[0])).Checked;Attached = ((System.Web.UI.WebControls.CheckBox)(BaysGrid.MasterTableView.GetSelectedItems()[0].FindControl("bgAttached"))).Checked;Attached = Convert.ToBoolean(BaysGrid.SelectedItems[0].Cells[5].Text);Grid name is BaysGrid, Markup for the specific column is:
<telerik:GridCheckBoxColumn DataField="bAttached" DataType="System.Boolean" FilterControlAltText="Filter bgAttached column" HeaderText="Attach" UniqueName="bgAttached"> <HeaderStyle Width="40px" /></telerik:GridCheckBoxColumn>Thanks
Paul