PDA

View Full Version : [C#] retrieving selected index-value of a listview


Scientist_nl
11-21-2007, 02:01 PM
Hi guys,

I've made a listview, and need to retrieve the value of the selected index. In simple words, if someone clicks the third item in the listview, the program needs to return the integer 2.

Anyone knows how to handle this?

Roelf
11-23-2007, 03:05 PM
a search on google using the keywords: C# listview selectedindex

this was the return, maybe you can use it (http://msdn2.microsoft.com/en-us/library/system.windows.forms.listview.selectedindexchanged(VS.71).aspx).