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

Dealing with IsExpanded in large hierarchial RadGridView

1 Answer 160 Views
GridView
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 24 Aug 2016, 12:04 AM
I am running into issues with IsExpanded in our hierarchial RadGridView.

We have the IsExpanded property bound in a style, using the following statement:

<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />

This works up until the GridView has enough items that it needs to scroll.   If the user scrolls, the binding to IsExpanded gets messed up due to Virtualization.

So I set EnableRowVirtualization="False" on the grid and that fixed the problem. 

HOWEVER, now when a user hits our "Expand All" button, it takes FOREVER to expand all of our rows, upwards of several minutes.   With Row Virtualization, it took a few seconds.  So clearly we can't do this.

How should I be attempting to do this?  Is there a different way we should be handling IsExpanded that will allow us to work with Row Virtualization turned on?   We are MVVM and I'd prefer to handle this in our ViewModel like we currently are, but I don't mind stuffing a few things into the code behind if it means fixing this problem.

Thank you for any direction you can give us on this issue. 

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 26 Aug 2016, 12:20 PM
Hi James,

If the IsExpanded property of GridViewRow is bound through a Style, the virtualization should not cause such behavior. Attached you can find a sample application demonstrating this. Can you please check it out?

If it does not help, may I also ask you to modify it with your project setup and send it as an attachment in a new support thread? We will review it locally and provide a possible solution.

Thanks in advance for your cooperation.

All the best,
Stefan X1
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
GridView
Asked by
James
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or