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

[Solved] RadGrid Grouping

2 Answers 167 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ali Akbar
Top achievements
Rank 1
Ali Akbar asked on 04 Aug 2009, 11:51 AM
In the below code i am able to see the another grouping only after i click the expand symbol which makes the postback n shows up the sub groups.  

ex: Once clicked the category expand symbol it makes the postback n shows up sub group (here its name). i want it by default every thing should be displayed in collapsed mode.
 <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceI="SqlDataSource1" 
   GridLines="None" 
   AllowPaging="false" PageSize="25" 
   Skin="Outlook" DataSourceID="SqlDataSource1">  
 
 
 <MasterTableView DataSourceID="SqlDataSource1">  
   <GroupByExpressions> 
         <telerik:GridGroupByExpression  > 
         <SelectFields> 
          <telerik:GridGroupByField  
            FieldName="Category"  HeaderText=""/>  
         </SelectFields> 
           <GroupByFields> 
              <telerik:GridGroupByField  
                 FieldName="Category" /> 
               </GroupByFields> 
         </telerik:GridGroupByExpression> 
         <telerik:GridGroupByExpression  > 
         <SelectFields> 
          <telerik:GridGroupByField  
            FieldName="Name"  HeaderText=""/>  
         </SelectFields> 
           <GroupByFields> 
              <telerik:GridGroupByField  
                 FieldName="Name" /> 
               </GroupByFields> 
         </telerik:GridGroupByExpression> 
   </GroupByExpressions> 
    </MasterTableView> 
    <ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="false" AllowColumnsReorder="false">  
                <Selecting AllowRowSelect="false"></Selecting> 
                  
                            </ClientSettings> 
   
</telerik:RadGrid> 
Thanks a million in advance.,

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 04 Aug 2009, 12:05 PM
Hi Ali,

You can set the GroupsDefaultExpanded property of the MasterTableView to false which is true by default.
aspx:
 <telerik:RadGrid DataSourceID="SqlDataSource1" ID="RadGrid1" runat="server"
         <MasterTableView GroupsDefaultExpanded="false" DataSourceID="SqlDataSource1"
             

Regards
Princy.
0
Ali Akbar
Top achievements
Rank 1
answered on 04 Aug 2009, 12:10 PM
Thanks a lot princy for writing it worked. As i am new to telerik.

One more question is i dont want the field name in the group text?
Tags
Grid
Asked by
Ali Akbar
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Ali Akbar
Top achievements
Rank 1
Share this question
or