Persisting Checkbox state while paging in SPGridView
Suppose I have created a spgridview with the following code.
<SharePoint:SPGridView ID="spgridList" Visible="false" runat="server" AutoGenerateColumns="false"
Width="100%" AllowPaging="true" AllowSortin开发者_C百科g="true" AllowFiltering="true" PageSize="5"
OnPageIndexChanging="spgridList_PageIndexChanging" HeaderStyle-BackColor="Red"
onrowdatabound="spgridList_RowDataBound" onrowcommand="spgridList_RowCommand">
<PagerStyle CssClass="ms-descriptiontext" />
<HeaderStyle BackColor="Blue" ForeColor="Black" Font-Bold="true" />
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox CssClass="chkbox" Checked="false" ID="chkField" AutoPostBack="true"
OnCheckedChanged="chkField_CheckedChanged" runat="server" />
</ItemTemplate>
<HeaderTemplate>
<asp:CheckBox ID="chkSelectAll" runat="server" AutoPostBack="true" OnCheckedChanged="chkAll_CheckedChanged" />
</HeaderTemplate>
</asp:TemplateField>
</Columns>
</SharePoint:SPGridView>
To persist the checkbox states between pagebacks ,currently i am using session states.It has some draw backs.Now how can I persist the checked states,when the user manually checks all the checkboxes,how can i make a check on the header checkbox?Provide some links
How about emulating it like a select CheckBox but disabling the focus of the row?
Selection of the rows is maintained across pages.
http://www.devexpress.com/Support/Center/p/E1559.aspx
精彩评论