Sorting In A Virtual ListControl
-
I am Having a Virtual List Control,with 5 columns.if i double clock on the first column i want to sort the list by that column,& if i clicked on second column i want to sort it by that column & till the last column. how i can accomplish this.Can i get a simple example of this
-
I am Having a Virtual List Control,with 5 columns.if i double clock on the first column i want to sort the list by that column,& if i clicked on second column i want to sort it by that column & till the last column. how i can accomplish this.Can i get a simple example of this
As far as i know virtual list controls do not provide you with any means of sorting, you have to do it yourself. If the user clicks a column header you get a LVN_COLUMNCLICK[^] notification from your list control (i don't know about doubleclick, look around List View[^] in MSDN), upon this message you should/need to sort your data yourself (using some nice sorting algorithm like Quick-sort[^]) and then redraw the list items. Good luck.
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > Sometimes you just have to hate coding to do it well. <