如何让所选择的ListView项的索引号 [英] how to get the index number of the selected listview item

查看:116
本文介绍了如何让所选择的ListView项的索引号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置我的ListView多选=假,查看=细节,FullRow选择= TRUE,HideSelected =假。

我有有10个项目之一coulumn。我想在选定行索引的 vb.net


解决方案

 昏暗指数为整数= ListView1.SelectedIndices(0)

记住的indeces在VB.NET是基于0。

I have set my listview multiSelect = false, view = details , FullRow select = true , HideSelected = False.

I have one coulumn which has 10 items . I want to get the selected row index in vb.net

解决方案

Dim index As Integer = ListView1.SelectedIndices(0)

remember indeces in VB.NET are 0-based.

这篇关于如何让所选择的ListView项的索引号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆