开发者

listview Selected Item

I am using C#. I need to know how can I access data which is on listview. tha开发者_如何转开发nk 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.

P.S: See the MSDN-Library


var item = YuorListViewName.SelectedItem;


Use the Items property as shown here

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜