Click here to Skip to main content
16,016,157 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,how can i assign a row selected in listview to a string array?
Posted

1 solution

Use the SelectedListViewItemCollection.CopyTo method.

ListView.SelectedListViewItemCollection coll =
            this.ListView1.SelectedItems;
     coll.CopyTo(myArray);
 
Share this answer
 
Comments
ali_vampire 22-Aug-11 8:56am    
i use this code on click event of listview,but CopyTo method should have 2 parameters,this code have an error,plz help me

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