How do you get the index of the currently selected item in a listview?
-
Greetings! me again. In a listview, how can I get the index # of the currently slected row? I see how to get a collection of selected items and a collection of checked items, but not the last selected item. It's been a long rainy day, help please. Thanks, Karen Nooobie to OOP and VB.Net 2005
-
Greetings! me again. In a listview, how can I get the index # of the currently slected row? I see how to get a collection of selected items and a collection of checked items, but not the last selected item. It's been a long rainy day, help please. Thanks, Karen Nooobie to OOP and VB.Net 2005
I'm not at my machine with '05 on it, but is there not a Object.SelectedItem.Index property? If not you will need to code a loop for 0 to count-1 to go through and try to match the selected item (i.e. object.items(loopvar) = object.selecteditem then loopvar will have your index value and you can exit the for loop.
-
Greetings! me again. In a listview, how can I get the index # of the currently slected row? I see how to get a collection of selected items and a collection of checked items, but not the last selected item. It's been a long rainy day, help please. Thanks, Karen Nooobie to OOP and VB.Net 2005