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

[Solved] Collapsed Group by default.

2 Answers 141 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ronald
Top achievements
Rank 1
Ronald asked on 22 Jun 2009, 10:58 AM
hi Telerik team,
    i'm using telerik GridView  in my project. i'm using Grouping there, when i'm drag and drop my group column, is it possible to Collapse all the Grouped Result by default??? By default getting expanded Groups. is there any property to set it as Collapsed by default.??


Thanks in advance
Ree

2 Answers, 1 is accepted

Sort by
0
Accepted
Milan
Telerik team
answered on 23 Jun 2009, 05:44 AM
Hello Ronald,

Currently all groups are expanded and this behavior cannot be turned off but you can manually collapse all groups. Just subscribe to the DataLoaded event and in the event handler do the following:

private void RadGridView_DataLoaded(object sender, EventArgs e)  
{  
    foreach (var record in this.RadGridView1.Records)  
    {  
        GroupRecord group = record as GroupRecord;  
 
        if (group != null)  
            group.IsExpanded = false;  
    }  

Hope this works.

Kind regards,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Ronald
Top achievements
Rank 1
answered on 23 Jun 2009, 06:49 AM
hi Milan,
    thanks for the solution. its working..

    i've another doubt, need help on this - http://www.telerik.com/community/forums/silverlight/gridview/customized-sorting-not-working.aspx


Thanks in advance,
Ree
Tags
GridView
Asked by
Ronald
Top achievements
Rank 1
Answers by
Milan
Telerik team
Ronald
Top achievements
Rank 1
Share this question
or