Hello,
I have a webdatagrid in which one of my columns is select all with a checkbox in the header row and as well as in the Template row.In my checked changed event of the header checkbox , i need to check all and deselect if unchecked. How do I reference the headerrow checkbox in my checked changed event?
<ig:TemplateDataField Key="Select" Width="15px">
<HeaderTemplate>
<asp:CheckBox ID="cbSelectAll" runat="server" AutoPostBack="True" OnCheckedChanged="chkSelectAll_Checked"/>
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox runat="server" ID="chkRowSelection"/>
</ItemTemplate>
</ig:TemplateDataField>
I am trying something like this:
protected
void chkSelectAll_Checked(object sender,EventArgs e)
{
//if header select is checked then check all else uncheck all
chk.Checked =
true;
}
How do I reference the header row checkbox and handle the event
Hello ssvan,
Let me know if you need further assistance with your question.