如何在列表视图控件中获取项目的值

问题描述:

大家好
很抱歉提出错误的问题

我正在尝试获取第一个值的索引,然后获取第二个索引,依此类推....从列表视图中获取值而不是列表视图控件,但未单击列表视图控件中的项目...
我正在创建一个列表框并向其中添加项目,但是在向其中添加项目后,无需单击即可在列表框中逐个获取值或项目索引...
谁能对此有所了解....我在网上搜索但未找到...

Thanks

hello everyone
sorry for asking wrong question

I m trying to getting index of first value and then second and so on....from list view not values listview control but without click on item in listview control...
i m creating one listbox and add item into it but after adding items into it fetch value or index of item one by one in listbox without click ...
can anyone have idea about this....i have searched on web but not found...

thanks

使用foreach遍历列表框中的每个项目.您如何建议触发事件以获取所有这些数据?您如何知道用户选择的项目是什么?如果用户没有在列表中选择一个值,并且您确定要获取所有值,那么当您首先填充列表时,您是否已经拥有所有这些值?您的问题中遗漏了什么吗?
Use a foreach to iterate through each of the items in the listbox. How do you propose to trigger the event to get all of this data? How will you know which is the user''s selected item? If the user isn''t selecting a value in the list and you are getting all of the values surely you already have all of these from when you populate the list in the first place? Is there somthing missing from your question?