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

[Solved] Open HierarchyChildTemplate programmatically

4 Answers 176 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.
Bastian Kraehmer
Top achievements
Rank 1
Bastian Kraehmer asked on 24 Jan 2011, 09:18 AM
Hello,

I use the hierarchical gridview in my application, but after loading the GridView 
the hierarchical entries are always collapsed.
Is it possible to load the GridView with opened childs or at least to open them programmatically?


Regards,

Bastian Kraehmer

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 24 Jan 2011, 09:20 AM
Hi,

 You can use ExpandHierarchyItem() method to achieve your goal. For example:

RadGridView1.ExpandHierarchyItem(RadGridView1.Items[0]);

Greetings,
Vlad
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Bastian Kraehmer
Top achievements
Rank 1
answered on 24 Jan 2011, 09:32 AM
Hi,

thank you for that quick reply.

I was hoping that there would be a way to achieve that from inside of the xaml, since I'm using MVVM and my ViewModels don't know the Views.
But I guess I'll have to do that by an attached behavior or something equal in that case.

Regards,

Bastian Kraehmer
0
Accepted
Vlad
Telerik team
answered on 24 Jan 2011, 09:39 AM
Hi,

 You can do this with  XAML as well  - every row have IsExpanded property and you can set this with style. 

Kind regards,
Vlad
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Bastian Kraehmer
Top achievements
Rank 1
answered on 24 Jan 2011, 09:56 AM
Hi,

thank you.  That worked just fine.

Regards,

Bastian Kraehmer
Tags
GridView
Asked by
Bastian Kraehmer
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Bastian Kraehmer
Top achievements
Rank 1
Share this question
or