Saturday, February 19, 2011

C#: How do you tell which item index is selected in ListView?

C#: How do you tell which item index is selected in ListView?

From stackoverflow
  • Use the SelectedIndex property of the class.

  • Have you tried SelectedIndices?

    myListView.SelectedIndices
    
  • ListView mylistv = new ListView();
    var index = mylistv.SelectedIndices();
    

    That should do it.

0 comments:

Post a Comment