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

How to make rows collapse after grouping

2 Answers 47 Views
Grid
This is a migrated thread and some comments may be shown as answers.
AkAlan
Top achievements
Rank 2
AkAlan asked on 16 Sep 2011, 08:07 PM
I have a radgrid with a hierarchy and I have it set so the child table has grouping enabled. It works fine except that I would like the rows to be collapsed after the grouping selection is made. How do I go about making that happen? Thanks for any help.

I'm using version Q2 2011 and a the grid is bound to a sqldatasource

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 21 Sep 2011, 11:38 AM
Hello Alan,

I guess you want to collapse the Grouped rows in child table when expanding the corresponding parent row. If so you can set the 'GroupsDefaultExpanded' property of Detail table as 'False' like below.

ASPX:
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1">
       <MasterTableView DataKeyNames="CustomerID" DataSourceID="SqlDataSource1" CommandItemDisplay="Top">
           <DetailTables>
               <telerik:GridTableView runat="server" DataKeyNames="OrderID" DataSourceID="SqlDataSource2"
                                               GroupsDefaultExpanded="false">
                   <GroupByExpressions>
                         .   .   .   .   .   .  .

-Shinu.
0
AkAlan
Top achievements
Rank 2
answered on 21 Sep 2011, 09:38 PM
Worked perfectly, Thanks
Tags
Grid
Asked by
AkAlan
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
AkAlan
Top achievements
Rank 2
Share this question
or