StevoSimpson
Programmer
Hi,
I've managed to create a listView which can sort the columns in ascending or descending order by following the MS help file:
However, this sorts by string, so any numbers, for example in an ID field, dont get sorted correctly - instead of 0, 1,2,3,4,5 etc, I get: 0,1,10,100,101 etc.
In the hepl file, it says that to compare by a different means, ie. integers, etc, then just change this code:
However, it doesn't say what to change it to, and I'm not entirely sure how to do this. Does anyone have any ideas?
Cheers.
I've managed to create a listView which can sort the columns in ascending or descending order by following the MS help file:
However, this sorts by string, so any numbers, for example in an ID field, dont get sorted correctly - instead of 0, 1,2,3,4,5 etc, I get: 0,1,10,100,101 etc.
In the hepl file, it says that to compare by a different means, ie. integers, etc, then just change this code:
Code:
ObjectCompare->Compare(listviewX->SubItems->Item[ColumnToSort]->Text,listviewY->SubItems->Item[ColumnToSort]->Text);
However, it doesn't say what to change it to, and I'm not entirely sure how to do this. Does anyone have any ideas?
Cheers.