CookieMonster24 Posted August 14, 2003 Posted August 14, 2003 when i select an item in my listview, i set the item index into a variable. however, i just wanted to know, is there a way to remove the item index value if you click on a portion of the listview where nothing exists? For instance, my listview contains space to have twenty items in the table. when i display my data, only two rows are filled. i select one row, and i place that index number in a variable. but suppose i select the fourth line of the listview, there is nothing there and the original item i selected is not highlighted, yet the variable still contains the original index number that i first selected. is there a way to remove that original index number? the reason i need to know is because if someone presses a specific button and there is nothing highlighted, but there was something selected prior to that, then the user will not be able to tell which row they were deleting. Quote
Photovoltaic Posted August 14, 2003 Posted August 14, 2003 If ListView1.SelectedItems.Count = 0 Then varTheIndex = -1 End If Quote
CookieMonster24 Posted August 14, 2003 Author Posted August 14, 2003 thanks. just what i was looking for. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.