How to make rows collapse after grouping

3 posts, 0 answers
  1. AkAlan
    AkAlan avatar
    121 posts
    Member since:
    Jun 2009

    Posted 16 Sep 2011 Link to this post

    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. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 21 Sep 2011 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. AkAlan
    AkAlan avatar
    121 posts
    Member since:
    Jun 2009

    Posted 21 Sep 2011 Link to this post

    Worked perfectly, Thanks
Back to Top