Hi,
I've a XamGrid, which has some static columns (create and bind with property in xaml), and have some dynamic column which gets created during the execution.
My data source is an object that contain further List of some object.
Entity {
prop1, prop2, List<Entity2> children
}
I want to show data like:
| Prop1 | Prop2 | children[0].Prop1 | children[0].Prop2 |
I am creating unbound column with HeaderTemplate, ItemTemplate etc, setting key as "children[0].prop1".
Issue is, Xamgrid is NOT showing any data in any of my new columns.
Thanks.
Vijay W
Hello Vijay,
Thank you for your reply. I am very glad that my reply was helpful for you. Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Hi Krasimir,
I tested the code, and its working! Great!
I'll try this code in my application and will confirm if its working. I have a complicated class structure where am extending XamGrid as well.
Thanks for the solution though!
Cheers!
Thank you for your post. I have been looking into it and when you are using UnboundColumn, you can control the content of the cell by setting bindings inside the ItemTempalte. If you wish to use the key property to set the path to the property you wish to display, I can suggest using TextColumns. I have created sample application for you, by using the code snippet that you have provided, that shows how you can add columns dynamically at runtime, using the key property to TextColumns to show the value of the cell.
Please let me know if you need any further assistance on the matter.