Hello :-)
I have built a ListView and filled it like this (simplified pseudo code):
Now, when the myListView.Sort ing property is set to anything else but "None" the listview will be sorted, ascending or descending. But what determines by which entity it will be sorted?
The MS docs only say:
The Sorting property allows you to specify whether or not items are sorted in the ListView control. By default, no sorting is performed. When the Sorting property is set to Ascending or Descending, the items in the ListView are sorted automatically in ascending alphabetical order (when the property is set to Ascending) or descending alphabetical order (when the property is set to Descending).
Grateful for any insight and help
- Ralph
I have built a ListView and filled it like this (simplified pseudo code):
Code:
Dim clm(3) As String For i = 0 To rows clm(0) = something(i) clm(1) = anything(i) clm(2) = stuff(i) Dim itm As ListViewItem = New ListViewItem(clm) myListView.Items.Add(itm) Next
Now, when the myListView.Sort ing property is set to anything else but "None" the listview will be sorted, ascending or descending. But what determines by which entity it will be sorted?
The MS docs only say:
The Sorting property allows you to specify whether or not items are sorted in the ListView control. By default, no sorting is performed. When the Sorting property is set to Ascending or Descending, the items in the ListView are sorted automatically in ascending alphabetical order (when the property is set to Ascending) or descending alphabetical order (when the property is set to Descending).
- The "items" are an array each. So by which member of the array will the ListView be sorted?
- Can I set a key, and would it make sorting quicker (currently taking a painful 5+ minutes for a 23000 items ListView)?
- The ListViewItem.Na me property is often referred to as a 'key', but with the above fill method this property will remain an emtpy string. Does it make any sense to set it to some value?
Grateful for any insight and help
- Ralph
Comment