I am using C#. I need to know how can I access data which is on listview. thank u.
Know that Google is your best friend! ;)
Here are the ListView Members . You want to use the SelectedItems property.
I'm assuming Windows Forms here.
Otherwise in WPF, you have both:
SelectedItem , inherited from the Selector class.
SelectedItems , inherited from the ListBox control.
Use the SelectedItems
property. This is a collection with all currently selected items. It may empty if no item is selected.
PS: See the MSDN-Library
var item = YuorListViewName.SelectedItem;
如使用的项目属性这里
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.