I am creating android app using Kotlin. I have fully functional multi column sorting. When I click on table header column it adds it index to sorting column list. It sorts both ways (ascending and descending). On click it changes direction. Everything works fine. But I would like to know what would be the best solution to remove sorting from one column.
I have few ideas but they don't sound good:
I would like some help because I don't know how to implement this feature in a good way.
Edit1:
Forgot to mention that sorting happens in back-end. In android I just set parameters which columns I need to sort and then send GET request to the server. As response I get sorted data.
I would mimic the way Google Spreadsheets does:
It shows a dialog and you can add sort columns and delete them.
You can see it by selecting some columns and going to Data / Sort the range
.
Another possibility would be to have a 3 states switch in each column (sort ascending, sort descending, not sort). Here you can see it working in a website (look at the Multiple column sorting example): http://demos.shieldui.com/web/grid-general/sorting but, in my opinion, it is more confusing.
Hope this helps.