S
Scott Toney
I have a list view that I am populating from a database. I am doing some
manipulation on the data and then I want the listview to "refresh", so I am
trying to remove the items / subitems in the list box with:
If (lvChief.Items.Count > 0) Then
For Index = 1 To lvChief.Items.Count
lvChief.Items.Remove(lvChief.Items.Item(0))
Next
End If
I created a button to do lvChief.Items.Remove(lvChief.Items.Item(0)), the
number of times that corresponds to the number of entries in my listview, it
removes them, but when I use the above steps, I get an:
System.ArgumentOutOfRangeException:index
Thanks
Scott
manipulation on the data and then I want the listview to "refresh", so I am
trying to remove the items / subitems in the list box with:
If (lvChief.Items.Count > 0) Then
For Index = 1 To lvChief.Items.Count
lvChief.Items.Remove(lvChief.Items.Item(0))
Next
End If
I created a button to do lvChief.Items.Remove(lvChief.Items.Item(0)), the
number of times that corresponds to the number of entries in my listview, it
removes them, but when I use the above steps, I get an:
System.ArgumentOutOfRangeException:index
Thanks
Scott