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


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.



  • 22832
    Offline posted


    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.

Reply Children