does anyone know if its possible to sort a virtual listview when you click a column? I've been fooling around with it but haven't had any luck, so i'm not even sure it would be possible since technically there are no items in the listview.
Printable View
does anyone know if its possible to sort a virtual listview when you click a column? I've been fooling around with it but haven't had any luck, so i'm not even sure it would be possible since technically there are no items in the listview.
Welcome to the Forums.
What do you mean by a virtual listview that doesnt really have listitems?
http://www.mvps.org/vbvision/grouped...box_&_Combobox
there is an example of a virtual listview on that site.
Oh so cool! I would say yes, but with lots of effort. You would need to (while subclassing
the listview) trap for the NMHEADER type notification and get the iButton to determine the
index number of the listview column was clicked. Then have a boolean flag to determine the
direction of the sort. If clicked once then its opposite from the sorting you originally "loaded"
the listview with, etc. Sort your array or rs accordingly and "reload" the listview in the
appropriate order.
HTH