This is a migrated thread and some comments may be shown as answers.

RadGrid client side toggle selection with server side persisting of the selected items after Sorting, Filtering and Paging

1 Answer 82 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Shumaila Imran
Top achievements
Rank 1
Shumaila Imran asked on 22 Feb 2011, 07:52 AM
My problem is related to this Code Library solution for Row Selection Persistence on Paging & Filtering.

The header checkbox does not work if Grouping is enabled in the RadGrid and/or there is another RadGrid nested within in the outer RadGrid.

I've added the Group Expressions and NestedViewTemplate in the code sample to reproduce the problem. Could anyone please mention the reason why the header selection does not work in this code sample with Grouping and NestedViewTemplate ?
<telerik:RadGrid ID="RadGrid1" runat="server" Skin="Outlook" AllowSorting="true" AllowPaging="true"
           AllowFilteringByColumn="true" AutoGenerateColumns="false" ShowGroupPanel="true" PageSize="6" >
           <MasterTableView DataKeyNames="ID">
                <GroupByExpressions>
                      <telerik:GridGroupByExpression>
                          <SelectFields>
                                 <telerik:GridGroupByField FieldAlias="Public" HeaderText="Grouped by Public & Private Questions"  FieldName="ID" />
                           </SelectFields>
                           <GroupByFields>
                                 <telerik:GridGroupByField FieldName="ID" FieldAlias="Public"    />
                           </GroupByFields>
                        </telerik:GridGroupByExpression>
                 </GroupByExpressions>
                  
                 <NestedViewTemplate>
                    
                       <telerik:RadGrid ID="RadGrid2" runat="server" Skin="Outlook" AllowSorting="true" AllowPaging="true"
                                AllowFilteringByColumn="true" AutoGenerateColumns="false" ShowGroupPanel="true" PageSize="6" >
                           <MasterTableView DataKeyNames="ID">
                            
                               <Columns>
                                    <telerik:GridBoundColumn DataField="ID" UniqueName="ID" HeaderText="ID">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Item" AllowSorting="false" UniqueName="Item"
                                       HeaderText="Item">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Date" UniqueName="Date" HeaderText="Date">
                                    </telerik:GridBoundColumn>
                               </Columns>
                            </MasterTableView>
                         </telerik:RadGrid>  
                    
                 </NestedViewTemplate>
                  
                  
               <Columns>
                   <telerik:GridTemplateColumn AllowFiltering="false" UniqueName="template">
                       <ItemTemplate>
                           <asp:CheckBox ID="CheckBox1" runat="server" />
                       </ItemTemplate>
                       <HeaderTemplate>
                           <asp:CheckBox ID="CheckBoxHeader" runat="server" />
                       </HeaderTemplate>
                   </telerik:GridTemplateColumn>
                   <telerik:GridBoundColumn DataField="ID" UniqueName="ID" HeaderText="ID">
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="Item" AllowSorting="false" UniqueName="Item"
                       HeaderText="Item">
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="Date" UniqueName="Date" HeaderText="Date">
                   </telerik:GridBoundColumn>
               </Columns>
           </MasterTableView>
           <ClientSettings>
               <ClientEvents OnRowClick="onRowClick" />
           </ClientSettings>
       </telerik:RadGrid>
       <asp:HiddenField ID="HiddenField" runat="server" />


1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 25 Feb 2011, 12:36 PM
Hello Shumaila,

You may consider using the example from this code library thread as starting points for your implementation:
http://www.telerik.com/community/code-library/aspnet-ajax/grid/selectall-option-in-grid-header-along-with-individual-group-selection.aspx

Kind regards,
Pavlina
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Grid
Asked by
Shumaila Imran
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or