Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
515
XamGrid Dynamic UnboundColumn Binding
posted

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

Parents
  • 30945
    Verified Answer
    Offline posted

    Hello Vijay,

     

    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.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

    DynamicalColumns.zip
Reply Children