Click here to Skip to main content
15,893,790 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
How to get index value of all the selected items from listview control? And i have to store those values in list, whose datatype is Integer
Posted
Updated 6-Sep-10 18:25pm
v2

1 solution

ListView has a SelectedIndecies property - you can use it directly, or copy
it to a List<int>:
C#
List<int> lstIndecies = new List<int>();
foreach (int idx in myList.SelectedIndices)
    lstIndecies.Add(idx);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900