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
95
dynamic columns and binding dictionary to columns
posted

Hi, I am trying to create dynamic columns and attach the custom object which has dictionary collection and I would like to display them in the xamdatagrid. I was able to create one with standard datagrid but could not do the same with xamdatagrid. Any resources,links,pointers will help. I have attached the sample that I created with standard datagrid.

Thanks

Raghavendra

wpfWorkItemListViewer.zip
Parents
  • 16495
    Offline posted

     

    Hello,

     

    Thank you for your post.

     

    I have been looking into your issue. I created a short sample application based on your scenario to show you how you can implement the functionality that you want.

    In the sample I set the AutoGenerateFields to False and handle the FieldLayoutInitialized event of XamDataGrid to generate the fields dynamically. In the event handler I loop thought the keys in Items, create an unbound fields for each item and add it to the FieldLayout of XamDataGrid.

     

    Please let me know if you need any further assistance on this matter.

    XamDataGridDictionary.zip
Reply Children