HOW TO GET THE SELECTED ITEM(S) IN A LIST VIEW CONTROL ListView returns collections of selected items and indices through the SelectedItems and SelectedIndices properties. Note that these collections are empty, if no item is currently selected( lst.SelectedItems.Count == 0).The first item that is selected is lst.SelectedItems[0]The index of this item in the Items collection islst.SelectedIndices[0].So basically
is the same as
You can also use check boxes. Set CheckBoxes to true for this. Through the CheckedItems and CheckedIndices properties you can see which items are checked. |
This blog aims to help visual basic .net programmers meet solutions to some everyday programming issues.
Showing posts with label control. Show all posts
Showing posts with label control. Show all posts
Saturday, February 2, 2013
HOW TO GET THE SELECTED ITEM(S) IN A LIST VIEW CONTROL
Subscribe to:
Posts (Atom)