Error clearing LISTVIEW items

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
 
B

Boris Nienke

how have you filled this item into the list? please post the code-snippet -
maybe the errors lays there

Boris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top