private void TakeActionOnSelectedCustomers ()
{
if (igWdgCustomers.Rows.Count != 0)
{
foreach (GridRecord row in igWdgCustomers.Rows)
{
CheckBox theCB = (CheckBox)row.Items[0].FindControl("cbSelect");
if ( theCB!= null && theCB.Checked)
// check for null because footer row doesn’t have cb
{
// take action
}
}
}
}
This is the column being checked.
<ig:TemplateDataField Key="cbSelect" width="30px">
<Header Text=" " />
<ItemTemplate>
<asp:CheckBox ID="cbSelect" runat="server" />
</ItemTemplate>
</ig:TemplateDataField>
In this case the checkbox is not databound, but it could be.
I have not found a way to use the CRUD feature of the datasource that the WebDataGrid uses to update the db value of a boolean represented by a databound checkbox.