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
65
Bind field to custom object
posted

Hi,

I'm using an ObjectDataProvider for an xamDataGrid. My datasource is a Generic List of a custom object. One of the properties of this object is a custom object with some more properties that I would like also to show on the datagrid but I don't know how. If I set AutoGenerateColumns to true it just gives me a column of that custom object and shows the name of the object in every cell of the column rows...

 

Thanks

 

Juan Puebla

  • 138253
    Offline posted

    Hello Juan,

     

    It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. So I have been looking through you post and I can suggest you use UnboundField to show this custom object properties. You can set its BindingPath property directly to the XamDataGrid’s underlying data object’s properties. If you have a Date property of DateTime type in you underlying object e.g you can set the UnboundField’s BindingPath property to Date.Year in order to display only the Year.

     

    Feel free to write me if you have further questions.