Index of a list view item in a group

1.2k views Asked by At

ListViewItem.Index property gets the zero-based index of the item within the ListView control. Now I need index of certain item in a ListViewGroup , not the whole control. Is it possible?

1

There are 1 answers

1
Xiaoy312 On

You can find its index within the group as such :

ListViewItem item = /* certain item in a ListviewGroup */;
var index = item.Group.Items.IndexOf(item);