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

Manually Creating NestedProperties

2 Answers 92 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 1
Bob asked on 31 May 2012, 06:31 PM
I am trying to create nested properties manually from code for a property grid.  I have an example solution that uses the same sample data used for the NestedProperties demo application.  The sample solution can be downloaded here.  When adding the PropertyDefintion's that should be nested to the NestedProperties the parent PropertyDefinition in the property grid does not show a + sign to indicate it has nested properties.

2 Answers, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 01 Jun 2012, 02:09 PM
Hi,

With the current version of RadPropertyGrid, only PropertyDefinitions that have a properly set Binding property can have nested PropertyDefinitions. However, as this has proved to be quite a limitation in certain scenarios, we are up to introduce a unbound mode for RadPropertyGrid with our incoming Q2 (a couple of weeks) release that will let users define their own hierarchies, without any dependencies between parent/child or sibling nodes. As a side note, please let me add that instead of loading DataTemplates from xaml string, you can utilize our AutoBind attached behavior that will let you reuse a DataTemplate definitions for multiple PropertyDefinitions. I am attaching a updated version of your project, having the issue fixed.

All the best,
Ivan Ivanov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Bob
Top achievements
Rank 1
answered on 01 Jun 2012, 07:37 PM
Ivan,
Thank you for your prompt response.  Looking forward to the next release.  I am aware of the AutoBind attached behavior.  I was just using the example data to make for a simple example.  We are actually working with dynamic property collections instead of a fixed property set for a concrete class.  We have a solution for a question in this forum regarding the PropertyGrid and MVVM.  I just haven't got around to creating a simple example of the methodology to post.  There were a couple of cruxes.  One was with creating the data templates using Xaml.  It appears there is still an issue with memory leaks when creating inline data templates.  There was a need to cache them as they were created and repurpose them with each update of the property collection being displayed.  Otherwise they were not being garbage collected when clearing the property definitions on the property grid.
Tags
PropertyGrid
Asked by
Bob
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Bob
Top achievements
Rank 1
Share this question
or