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

How to expand only specific rows?

1 Answer 197 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Fabien
Top achievements
Rank 2
Fabien asked on 15 Dec 2008, 02:24 PM
Hi,

I try to expand only specific rows.

I bind data myself and in the binding function, I try to do : row.IsExpanded = true;

But it don't work...
I tried "row.Group.HeaderRow.IsExpanded = true;" and it expand only the first GroupBy.

I have four GroupBy expressions and some rows must be expanded.

Thanks for your help.

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 15 Dec 2008, 05:24 PM
Hi Fabien,

Thank you for the question.

I am not quite sure what exactly is your implementation for binding RadGridView and expanding groups. However, you should be able to expand/collapse groups and below there are several examples of expanding groups:
// Expanding group at the first level  
radGridView1.Groups[0].HeaderRow.IsExpanded = true;  
 
// Expanding expanding group at the second level  
radGridView1.Rows[0].Group.Groups[0].HeaderRow.IsExpanded = true;  
 
// Expanding group at the third level  
radGridView1.Rows[0].Group.Groups[0].Groups[0].HeaderRow.IsExpanded = true

Please note that if you want to expand groups at second and third level, you should do it explicitly. Expanding a group at the first level does not automatically expands its children groups.

I hope this helps. If you continue to experience issues, please open a new support ticket and send me a sample project. This will allow me to investigate the case further and to provide you with additional assistance.

Greetings,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
Fabien
Top achievements
Rank 2
Answers by
Nikolay
Telerik team
Share this question
or