Hi Bosung Kim,
If the requirement is that users can build a cumulative sort order (e.g. Product Name → Size → Quantity), I don't believe Data Grid 2 currently supports Excel-style multi-column sorting through repeated header clicks out of the box. There is an Idea request asking for this capability.
If a default multi-column sort is sufficient, you can configure multiple sort attributes directly in the Data Grid 2 datasource settings, for example:
ProductName ASC Size ASC Quantity DESC
This works for database and XPath data sources.
For a reusable solution across different entities, I would store the user's sort preferences in a generic entity (Attribute, Direction, Sequence) and retrieve the data through a datasource microflow. This avoids creating custom logic for every grid and gives you flexibility to persist user preferences.
Store the user's selected sort criteria and drive the grid from a datasource microflow (or query layer). This keeps the implementation generic and avoids entity-specific sorting logic.
One additional consideration is user experience. If multiple sort levels are active, users should be able to see the order (for example: Product ↑ (1), Size ↑ (2), Quantity ↓ (3)) so the resulting sort remains understandable.
I hope this helps answer your question. If you need any additional details, feel free to reply below.
Best regards,
Oswaldo Valles