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
1270
XamDataGrid hierary different DataTemplates for top row and child records
posted

Hello,

what is the simplest way to assign different datatemplates for the top row of a hierarchy and a different one for the child records?

I have seen several approaches eg. TemplateSelector or to assing the style on loaded Event.

Thanks

Niko

Parents
No Data
Reply
  • 22832
    Offline posted

    Nikolaus,

    Assuming your question is on having a different template for parent rows vs what the child uses and your parent and child records have different schemas you can just create multiple FieldLayouts and the correct one will automatically be used.  If your Parent and Child records have the same schema or you wish to be able to specify a FieldLayout to use on a record by record basis, you can use the AssigningFieldLayoutToItem event.

Children