Dealing with IsExpanded in large hierarchial RadGridView

2 posts, 0 answers
  1. James
    James avatar
    5 posts
    Member since:
    Jan 2013

    Posted 23 Aug 2016 Link to this post

    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. 
  2. Stefan
    Stefan avatar
    1073 posts

    Posted 26 Aug 2016 Link to this post

    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.
Back to Top