Category issue in PropertyGrid

Grids for WPF Forum

Posted 15 years ago by Anurodh Ora
Version: 4.5.0486
Avatar
Hi,

I am using Property grid control and binding it through the xml file by writing a class to deserialize the xml data.

This class binds the data with the property grid clearly.

Now, to categorize the items in the property grid i have to either specify the Category attribute in the class with each property item or i have to specify it in XAML code.

However, I have multiple xml file to bind with property grid by selecting at run time.
and it also has the category element in it. Like


<Categories>
 <Category1>
   <Item1 />
   <Item2 />
 </Category1>
 <Category2>
   <Item1 />
   <Item2 />
 </Category2>
 <Category3>
   <Item1 />
   <Item2 />
 </Category3>
</Categories>

Now, I was looking to the feature in property grid that will automatically take the categories from the xml file and display items in the categorize form without specifying the category in XAML or code behind.

Can you please suggest me the way to have the above requirement.

Hope I was able to explain my problem.


Thanks

Anurodh

Comments (1)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Anurodh,

It sounds like you would need to implement a custom data factory. The data factory is responsible for turning the SelectObject(s) property and Properties collection into a list of "data accessors". These data accessors are then presented by the PropertyGrid.

You can hook in a custom data factory and organize the data accessors in any manner you like. You can also leverage our default data factories (using them as a base class) as needed.


Actipro Software Support

The latest build of this product (v24.1.1) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.