its about Sorting a list view
but its not working.
please help.......[code=vb]
Private Sub ListView1_Colum nClick(ByVal ColumnHeader As MSComctlLib.Col umnHeader)
'Determine whether the column is the same as the last column clicked.
If e.Column <> sortColumn Then
'Set the sort column to the new column.
sortColumn = e.Column
'Set the sort order to ascending by default.
ListView1.Sorte d = SortOrder.Ascen ding
ListView1.Sorte d
Else
'Determine what the last sort order was and change it.
If ListView1.Sorte d = SortOrder.Ascen ding Then
ListView1.Sorte d = SortOrder.Desce nding
Else
ListView1.Sorte d = SortOrder.Ascen ding
End If
End If
'Call the sort method to manually sort.
'listView1.Sort ()
'Set the ListViewItemSor ter property to a new ListViewItemCom parer
'object.
'listView1.List ViewItemSorter = New ListViewItemCom parer(e.Column,
'ListView1.Sort ing
End Sub[/code]
This is not working..please help...THANKS IN ADVANCE
but its not working.
please help.......[code=vb]
Private Sub ListView1_Colum nClick(ByVal ColumnHeader As MSComctlLib.Col umnHeader)
'Determine whether the column is the same as the last column clicked.
If e.Column <> sortColumn Then
'Set the sort column to the new column.
sortColumn = e.Column
'Set the sort order to ascending by default.
ListView1.Sorte d = SortOrder.Ascen ding
ListView1.Sorte d
Else
'Determine what the last sort order was and change it.
If ListView1.Sorte d = SortOrder.Ascen ding Then
ListView1.Sorte d = SortOrder.Desce nding
Else
ListView1.Sorte d = SortOrder.Ascen ding
End If
End If
'Call the sort method to manually sort.
'listView1.Sort ()
'Set the ListViewItemSor ter property to a new ListViewItemCom parer
'object.
'listView1.List ViewItemSorter = New ListViewItemCom parer(e.Column,
'ListView1.Sort ing
End Sub[/code]
This is not working..please help...THANKS IN ADVANCE
Comment