Matthias Hamann
Matthias Hamann

Reputation: 727

How to enable multiple column sorting on a (group)table programmatically?

How can I sort a grouptable multiple? I want to enable the sorting for a user. In addition I want to set the sorting programmatic.

For example: A Customer has many orders. In the table I want to see all orders sorted by order number for a user. The table should be sorted by customer.name and customer.order*.orderNumber.

Upvotes: 1

Views: 484

Answers (1)

knstvk
knstvk

Reputation: 637

GroupTable as well as Table does not support sorting by multiple columns at runtime.

But you can set a predefined order in the datasource query and disable sorting in table (set sortable attribute to false). The predefined order can be set depending on the current user: just modify the query order by clause in the init() method of the screen.

Upvotes: 2

Related Questions