Project

General

Profile

Feature #4380

WTableView: support for multiple column sorting

Added by Emeric Poupon almost 7 years ago. Updated over 5 years ago.

Status:
InProgress
Priority:
Normal
Target version:
-
Start date:
08/06/2015
Due date:
% Done:

0%

Estimated time:

Description

Hello,

Feature request: Multiple column sorts by clicking on Ctrl+left mouse on each column to be used for sorting.

Regards,


Files

#1

Updated by Trigve Siver almost 7 years ago

I would also like to have this feature. I could help with development, but I'm not that proficient in JS. I've implemented this feature in wxWidgets.

Also the concrete "shortcut" for multiple sorting should be custom defined (i.e. in config for instance).

#2

Updated by Trigve Siver almost 6 years ago

So I've implemented it in my branch. Attaching patch.

The left click is behaving as normal, that is it change the order if the column is sorted already. Otherwise it sort by the new column only.

Using CTRL + CLICK add new column for sorting. Clicking on the already sorted column will change it's order. CTRL + CLICK on already sorted column, will remove the column from the sorted column set. Clicking on the new column, not in already sorted columns set, will reset the sort only with this new column.

Please review.

#3

Updated by Koen Deforche almost 6 years ago

  • Status changed from New to InProgress
  • Assignee set to Roel Standaert

That sounds nice and glancing through the patch I like the approach. All it needs is support in our standard models that support sorting (WStandardItemModel, WSortFilterProxyModel).

#4

Updated by Trigve Siver almost 6 years ago

Ok, I can look at it in the near time.

#5

Updated by Trigve Siver over 5 years ago

Here is the patch for WStandardItemModel and WSortFilterProxyModel. Because I had a problem running examples, and don't have time to look at ti, no testing has been done.

Please review and let me know if there are any bugs.

Thank you

Also available in: Atom PDF