Using same PropertyDefinitions for nested Type

0 Answers 48 Views
PropertyGrid
Will
Top achievements
Rank 1
Iron
Will asked on 10 Nov 2023, 09:48 PM
I have a class (ItemTree Parent) bound to a RadPropertyGrid. The class also contains a List of it's own type (List<ItemTree> Children). Is it possible to apply the same PropertyDefinitions for both the parent and children?
Martin Ivanov
Telerik team
commented on 13 Nov 2023, 01:42 PM

In the default scenario, the PropertyGrid will create the same property definitions for the items in the Children too. I have attached a sample project showing this. If you have something other in mind, can you send over a drawing of the expected result, along with some code showing your models?
Will
Top achievements
Rank 1
Iron
commented on 14 Nov 2023, 04:17 PM

Yes this does work in the DEFAULT scenario, but I have custom property definitions.
Martin Ivanov
Telerik team
commented on 15 Nov 2023, 12:32 PM

I see. That said, would it be possible to send over some drawings showing the expected result? This way I can think of a specific idea to suggest for getting the desired result. 
Will
Top achievements
Rank 1
Iron
commented on 16 Nov 2023, 06:47 PM

Here's an example:

Martin Ivanov
Telerik team
commented on 21 Nov 2023, 03:30 PM

Thank you for the picture. This visualization cannot be created automatically with RadPropertyGrid. In order to get something similar, you can manually adjust the editors via the EditorTemplate of the PropertyDefinition objects. Additionally, you can take a look at the RadTreeMap control which provides layout capabilities very similar to your picture.

No answers yet. Maybe you can help?

Tags
PropertyGrid
Asked by
Will
Top achievements
Rank 1
Iron
Share this question
or