Page 1 of 1

Sort items when groups are shown

Posted: 22 Sep 2015, 07:07
by Mex
Hi Timo!

Is there a way to sort items, when groups are shown?
Sorting works fine, when groups are not show.


Regards
Meelis

Re: Sort items when groups are shown

Posted: 22 Sep 2015, 21:27
by TiKu
Hi,

It works for me on Windows 7 SP1. I just took the Events sample, put a call to ExLvwU.SortItems into the Form_Click handler, started the sample and renamed some items. After clicking onto the form, the items have been sorted correctly. I tried this a couple of times with different namings.
Which version of Windows are you trying with? Can you create a small sample app that demonstrates the problem?

Regards
TiKu

Re: Sort items when groups are shown

Posted: 23 Sep 2015, 05:54
by Mex
Hi,

I also tested your events sample, but same problem there.
If groups are enabled and you click column header, items are not sorted, but when you set ShowGroups=False, then sorting works fine.

In my app i use workaround - after click and sorting I set showgroups to false and back to true :)
And of course when alternating row background color is used, then we need to "redraw" all items.

Regards
Meelis

Re: Sort items when groups are shown

Posted: 23 Sep 2015, 07:36
by TiKu
Ok, so which version of Windows are you using? XP?

Re: Sort items when groups are shown

Posted: 23 Sep 2015, 07:51
by Mex
It does not work with Windows XP.

Re: Sort items when groups are shown

Posted: 25 Sep 2015, 19:44
by TiKu
Seems like Windows XP simply does not support it. I checked my code and it is the same for Windows XP as for Windows 7. I also opened Windows Explorer on Windows XP, activated groups and played around with sorting. If groups are activated, Windows Explorer does not support sorting neither.

Regards
TiKu

Re: Sort items when groups are shown

Posted: 26 Sep 2015, 10:19
by Mex
Thank you! :)