Author |
Message |
11/03/2014 12:40:37
|
mbreyer
Power User
Joined: 02/07/2013 16:08:31
Messages: 42
Location: Cologne
Offline
|
Hi,
i have a grid, filled with numerous items.
I set a sorting by clicking a column header.
This column can contain only 3 different values.
Now the items are sorted in this 3 categories and within this categories it's somelike random as it is not defined.
Afterwards I press an refresh button, which reloads the contents of the grid, in this scenario think of as nothing has changed. Now the sorting of the content doesn't fit to the displayed sort, as the sorting is maintained. To fix this i call FIXGRIDListBinding.resort() .
Now I would expect that the items are sorted just as they were after clicking the header. Unfortunately this happens only partially.
The items art sorted in the 3 categories, but within the categories it's different.
My first thought was 'ok, as it is not defined', but I can press the refresh-button multiple times and it is always sorted identical. So it seems the sort logic of FIXGRIDListBinding.resort() and the user-triggered sort logic are different.
Kind regards
Mario
|
|
|
11/03/2014 17:20:04
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5555
Offline
|
Hi,
no there is no difference between resort and user-click-sort.
Of course:
1. the sort status is kept by one column (if not using ctrl-click for mutiple sort)
2. the default sort that is used does not change the sequence if not required
So, if you have three columns "a","b","c" and the user clicks first "c", then "b", then "a" - then the grid will be sorted "by a" and due to the chronology of clicks also by "c" and "b".
If you now reload and resort then you will only sort by "a" (without first sorting "c" and "b") - so there is a difference! I strongly believe that this is your scenario...(?).
If the user does multiple sort (ctrl-click on header) then of course the multiple sort will be re-executed by the resort().
Regards, Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
12/03/2014 08:36:48
|
mbreyer
Power User
Joined: 02/07/2013 16:08:31
Messages: 42
Location: Cologne
Offline
|
Hi,
yes that seems logical, I will check this.
@Edit: yes that's the scenario and all is fine as I can explain this behaviour now. Thanks!!
regards,
Mario
|
|
|
|