简体   繁体   中英

GXT 3 MultiSort Grid

How can I get multiple sort a Grid in GXT 3? And how is the best way to view this to the user? Maybe in a Toolbar.

I have For multiple Filter i can you use a FilterPagingLoadConfig, but what for multiple Sort

Perhaps you can try to add more than 1 StoreSortInfo in your Grid List Store, ie:

listStore.addSortInfo(new StoreSortInfo<YourModelDataClass>(propertiesModel.firstSortCriteria(), SortDir.ASC));
listStore.addSortInfo(new StoreSortInfo<YourModelDataClass>(propertiesModel.secondSortCriteria(), SortDir.DESC));
listStore.addSortInfo(new StoreSortInfo<YourModelDataClass>(propertiesModel.thirdSortCriteria(), SortDir.ASC));

For the best way to present your sort criteria to user, you can use toolbar, and add some checkbox as much as your criteria, each time user check / uncheck it, just arrange your list store sort.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM