Page 1 of 1

SortItems & VirtualMode

Posted: 29 Aug 2006, 20:46
by alphi
Hi,

I recieve an Error -2147467259 by trying SortItems
on a ListView with VirtualMode enabled.
Is this a Bug or is this by definition?

with regards
alphi

Posted: 29 Aug 2006, 22:04
by TiKu
Virtual mode means, that the listview doesn't know anything about the data it displays. Therefore it can't sort the items.
To sort a virtual listview, make it redrawing itself (e. g. by calling the Refresh method), so it re-queries the items to display from your app. The items are displayed in the same order as you provide them in the ItemGetDisplayInfo event.

Sorting

Posted: 03 Sep 2006, 13:49
by alphi
Thanks for the hint.
Works fine. :mrgreen:

regards
alphi