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

Dynamic Expandable Properties.

3 Answers 85 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Hugues
Top achievements
Rank 1
Hugues asked on 19 Nov 2014, 06:08 PM
I have a class with 32 properties. When i use the  TypeConverter(typeof(ExpandableObjectConverter)) it displays all the properties under the expandable name of the object which is perfect. But some of my project will have less than 32 properties. So i want to be able to dynamically remove/add attributes and have them displayed in the property grid as expandable. So is that something that is possible to do with the PropertyGrid. If that is not possible, is there a way to do this with ICollection object that i can just pass as a dataSource.

Thanks.

3 Answers, 1 is accepted

Sort by
0
Hugues
Top achievements
Rank 1
answered on 19 Nov 2014, 06:29 PM
I figure it out. 

I am using the  CreateItemElement to figure out which item to make visible.
0
Hugues
Top achievements
Rank 1
answered on 19 Nov 2014, 06:37 PM
How do you dynamically modify an name on the property grid.
0
Hugues
Top achievements
Rank 1
answered on 19 Nov 2014, 06:48 PM
I figure that one too.

Thanks,
Jerome.
Tags
PropertyGrid
Asked by
Hugues
Top achievements
Rank 1
Answers by
Hugues
Top achievements
Rank 1
Share this question
or