How to see if a Listview has rows?

  • Thread starter Thread starter Elmo Watson
  • Start date Start date
E

Elmo Watson

I have a context menu strip, which is applied to the contextmenustrip
property of my listview

However, if there is no data in the listview, I really don't want it to
show?

I've tried several Listview properties, to see if they would work, but
haven't been able to come up with anything

How can I see if the listview has any rows of data in it?
 
if (ListView1.Items.Count==0)
{
//No item in the listview
}
else
{
//ListView contains item(s)
}
 
DOAH!
I totally missed that property somehow - - I was looking for listviewitems,
or something much more complicated!
 
Back
Top