GroupDefinitions collection empty

2 posts, 0 answers
  1. Vitalij
    Vitalij avatar
    35 posts
    Member since:
    Dec 2010

    Posted 22 Aug 2013 Link to this post

    Hi, I have a RadPropertyGrid with a combination of predefined and auto-generated properties organized in groups. I'm trying to implement a feature that remembers expanded/collapsed state of each group.
    There's no problem with saving those states, a simple foreach on GroupDefinitions collection with all the groups is sufficient when a view is closing. But I can't find an event to subscribe to on the RadPropertyGrid when the view is being generated and GroupDefinitions collection is not empty. I have tried Loaded, Grouped, IsVisibleChanged and many more but no luck so far. Only if I pause an application when the view is already showed I can verify, that GroupDefinitions collection is indeed not empty. Maybe there's something I've missed, so I would appreciate any help. Thanks!
  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 26 Aug 2013 Link to this post

    Hello Vitalij,

    Currently, you need to set RenderMode property of the property grid to "Flat" and work with dispacher in the Loaded event for example:

    private void RadPropertyGrid_Loaded(object sender, RoutedEventArgs e)
        {
            Dispatcher.BeginInvoke(new Action(() =>
            {
                var count = this.propertygrid.GroupDefinitions.Count();
            }));
         
        }


    Regards,
    Maya
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top