1

Closed

PropertyGrid not populating when bound to an ExpandoObject

description

I like the format and function of the property grid but I need to be able to dynamically create different sets of properties at runtime based on data I receive from a server.

When I bind to a regular data object that exists at compile time, the grid populates just fine. When I bind SelectedObject to an instance of an ExpandoObject instead, it never populates with my properties.

I've checked while debugging, and I definitely have dynamic properties on the object but the grid still isn't getting them, even if I assign SelectedObject after instantiating and populating my ExpandoObject.

Any ideas?

Thanks!

No files are attached

Closed Feb 9 at 3:15 AM by brianlagunas

Resolved by community user Cpt_Kork


comments

Cpt_Kork wrote Feb 8 at 7:38 AM

You have to provide your own ICustomTypeDescriptor for the PropertyGrid to display the dynamically created properties. Have a look at this thread:
http://wpftoolkit.codeplex.com/discussions/287866