C
Curtis
I am trying to do a simple sort on a list view.With the listview control the
first time I sort on the control it sorts the items but anytime after that
it fails to sort. I'm sure this is a simple answer but anyways here is my
code any help would be greatly apperciated.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
lvTest.Items.Add("1001")
lvTest.Items.Add("5000")
lvTest.Items.Add("1002")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
lvTest.Sorting = SortOrder.Descending
lvTest.Sort()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
lvTest.Sorting = SortOrder.Ascending
lvTest.Sort()
End Sub
Thanks,
Curtis
first time I sort on the control it sorts the items but anytime after that
it fails to sort. I'm sure this is a simple answer but anyways here is my
code any help would be greatly apperciated.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
lvTest.Items.Add("1001")
lvTest.Items.Add("5000")
lvTest.Items.Add("1002")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
lvTest.Sorting = SortOrder.Descending
lvTest.Sort()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
lvTest.Sorting = SortOrder.Ascending
lvTest.Sort()
End Sub
Thanks,
Curtis