p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   C# (http://p2p.wrox.com/forumdisplay.php?f=22)
-   -   How to get selected item from listview? (http://p2p.wrox.com/showthread.php?t=52048)

try.test.abc December 29th, 2006 02:26 AM

How to get selected item from listview?
I am using listview control. and i dont know how to get the item on which i click?.

Eyob_the_pro January 4th, 2007 02:34 AM

use this to access to selected item from a list box.

       string item = listBox1.SelectedIndex.ToString();

if selectionMode is MultipleSimple or MultipleExtended you can use this to get a collection of the selected items.

       string items = listBox1.SelectedItems;

All times are GMT -4. The time now is 08:42 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.