G
Guest
Hi folks,
I have a datagrid which contains a template item checkbox column. I've
included a checkbox as a HeaderTemplate item which fires a server-side
function to check or uncheck all the values in the underlying datatable
column, and resets the binding to the datagrid.
The only problem is that, when the user pages back and forth in the
datagrid, their selection is overwritten with the default selection in page
load. So, if the user unchecks the Select All box and then pages forward in
the datagrid, the Select All box now shows the default value (checked).
Does anybody have any ideas on how to programmatically set the
headertemplate checkbox when the page posts back?
Thanks in advance,
Andre Ranieri
<HeaderTemplate>
<asp:CheckBox id="chkAll" Checked="True" OnCheckedChanged="CheckAll"
runat="server" AutoPostBack="true"
ToolTip="Select/Deselect All"></asp:CheckBox><font face="Webdings"
color="white" size="4">a</font><!-- <INPUT
onclick="javascript:SelectAllCheckboxes(this);" type="checkbox"> -->
</HeaderTemplate>
I have a datagrid which contains a template item checkbox column. I've
included a checkbox as a HeaderTemplate item which fires a server-side
function to check or uncheck all the values in the underlying datatable
column, and resets the binding to the datagrid.
The only problem is that, when the user pages back and forth in the
datagrid, their selection is overwritten with the default selection in page
load. So, if the user unchecks the Select All box and then pages forward in
the datagrid, the Select All box now shows the default value (checked).
Does anybody have any ideas on how to programmatically set the
headertemplate checkbox when the page posts back?
Thanks in advance,
Andre Ranieri
<HeaderTemplate>
<asp:CheckBox id="chkAll" Checked="True" OnCheckedChanged="CheckAll"
runat="server" AutoPostBack="true"
ToolTip="Select/Deselect All"></asp:CheckBox><font face="Webdings"
color="white" size="4">a</font><!-- <INPUT
onclick="javascript:SelectAllCheckboxes(this);" type="checkbox"> -->
</HeaderTemplate>