2011-01-31 92 views
2

我已在我的列表視圖如何獲得

  • MULTISELECT =假
  • 查看這些選項的選擇列表視圖項的索引號=細節
  • FullRow選擇=真
  • HideSelected =假。

我有一列有10個項目。我想選擇的行索引中vb.net

回答

1
Dim index As Integer = ListView1.SelectedIndices(0) 

在VB.NET記住的indeces從0開始。

4

試試這個:

Dim x as Integer 
x = ListView1.FocusedItem.Index 

爲了獲取值:

Dim txtValue as String 
txtValue = ListView1.FocusedItem.SubItems(0).text