Error clearing LISTVIEW items

  • Thread starter Thread starter garfitz
  • Start date Start date
G

garfitz

Why does the following produce a "Managed
NullReferenceException" when the listview shows that there
are multiple items ?

Messagebox.Show(lstView.items.count) ' Shows value of 1

If lstView.Items.Count > 0 Then
lstView.Items.Clear() ' error occurs when executing
this stmt
End If
 
how have you filled this item into the list? please post the code-snippet -
maybe the errors lays there

Boris
 
Back
Top