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

[Solved] Collapsing Groups in the Grid

1 Answer 81 Views
Grid for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
jasonxz
Top achievements
Rank 1
jasonxz asked on 18 Jun 2013, 02:30 PM
I would like for my RadDataGrid to initially display with all of the Groups collapsed.
Is there a property or attribute I can use to do this?  I can't find one.
If not, is there some way I can programmatically implement this?

1 Answer, 1 is accepted

Sort by
0
Accepted
Ivaylo Gergov
Telerik team
answered on 20 Jun 2013, 08:20 AM
Hi Jason,

Thank you for contacting us.

Yes, it is possible through the IDataView interface that is exposed by the RadDataGrid control. More information can be found in the following help article - http://www.telerik.com/help/windows-8-xaml/datagrid-dataview-propertiesandconfigurations.html.
For the current scenario you can take advantage of the IDataView.CollapseAll() method:
grid.GetDataView().CollapseAll();

Note, that you need to ensure that the internal data operations are completed and the view can be properly accessed. This can be achieved through the RadDataGrid.DataBindingComplete event.


I hope this helps. Let me know if I can assist you in some other way.

 

Regards,
Ivaylo Gergov
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
Grid for XAML
Asked by
jasonxz
Top achievements
Rank 1
Answers by
Ivaylo Gergov
Telerik team
Share this question
or