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

GroupDefinitions collection empty

1 Answer 73 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Vladimir
Top achievements
Rank 1
Vladimir asked on 22 Aug 2013, 08:33 AM
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!

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 26 Aug 2013, 10:46 AM
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 >>
Tags
PropertyGrid
Asked by
Vladimir
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or