RE: [Question] ListViewControl - Numeric sortable Columns
Sorting columns doesn't seem to be possible yet as there are no functions or events for it (yet).
Also, using the Windows APIs and subclassing the listview will not work because you must use a callback function to be able to tell the sort APIs how to sort. Which isn't supported in JScript.
However, you can make some workarounds. But those will be just that: dodgy workarounds. eg: You could subclass the listview and detect a column button click. Upon this detection you could clear the entire listview and recreate it using the array you used to store all the elements, but sort it first. But I suggest you don't think about implementing something like this on large lists as it will be relativly slow. Not to mention that user selections, tick boxes, etc all will be cleared each time too (unless you first store those too, and reset them after the new listview is filled in... but which will slow things down even more).
So, either fill your listview with an already sorted list, use the different XML tags and stuff to have a prefixed sort order, or wait until Patchou implements a function/event for it so you can sort on the fly.
This post was edited on 01-12-2007 at 05:05 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
|