I can't find any documentation on this, but .Net 4 has added support for Data Binding with Dynamic objects and I want to use an ExpandoObject as my data source.
Hello Ed,
I am just checking your progress on the issue that you are having.
If you require any further assistance please do not hesitate to ask.
Thank you for your post.
I was investigating your question and it currently the XamDataGrid does not support AutoGenerateColumns for dynamic objects What I can suggest, in order to generate your fields dynamically is handling the FieldLayoutInitialized event and in it can use the GetDynamicMembersNames method of the DynamicClassObject, which returns enumeration of all dynamic member names and you can create the fields automatically for them. I created a sample application, based on this scenario.
You can download the sample from here: http://users.infragistics.com/DeveloperSupport/Dynamic%20Objects.zip
Please let me know if you need any further assistance on this matter.
I am trying to duplicate the functionality of binding to an ADO.Net DataTable without the overhead. Is there a way the properties of the dynamic object can be automatically discovered and the corresponding columns generated?
Thanks so much! I will take a look at the example right now.
I have been looking into your question, and I would suggest you use DynamicObject instead of ExpandoObject. I have created a sample application, based on this link: http://blogs.msdn.com/b/llobo/archive/2009/11/02/new-wpf-feature-binding-to-dynamic-objects.aspx , also from it you can read more details about biding to Dynamic Objects.
Please let me know if you need any further assistance on the matter.