Master Detail Hierarchy - How to set default sort

When I have a Master Detail Hierarchy, I don't know how to set the default sort of the Detail grid the user drills into. I can't see anyway to do it either on the master page or when I Edit the Template.

The master data are retrieved using LoadData event of the master grid - you can set default order there. For example with Orders -> OrderDetails



The expression is: ${event.orderby || 'OrderDate desc'}

The child data are retrieved using RowExpand event of the master grid - you can do the same with this invoke:



The expression is: ${event.orderby || 'ProductId desc'}

The result:

Master data sorted by OrderDate descending and child data sorted by ProductId descending:

1 Like

Perfect. I hadn't noticed the RowExpand event before. Thank you.