469,600 Members | 2,218 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,600 developers. It's quick & easy.

Count items in Listview

To count all the item in currently in my listview, i use
this.TotalMessages = myListView.Items.Count;

What can I use to count the number of item in the list box that has the
ImageIndex of 0?

Thanks

JB
Nov 17 '05 #1
1 38010
int image0Count = 0;
for( int i; i < myListView.Items.Count; i++ )
{
if( myListView.Items[ i ].ImageIndex == 0 )
{
image0Count++;
}
}
return image0Count;

"Jbatty" wrote:
To count all the item in currently in my listview, i use
this.TotalMessages = myListView.Items.Count;

What can I use to count the number of item in the list box that has the
ImageIndex of 0?

Thanks

JB

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Henry | last post: by
4 posts views Thread by Jon | last post: by
6 posts views Thread by Nick | last post: by
1 post views Thread by OpticTygre | last post: by
3 posts views Thread by RT | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.