Listview selected items, again

G

Guest

I need a little help here, I have a list view that may contain only a few
items. If the size of the listview is larger then what I need to hold the
items, and then the user click on whitespace, how can maintain that an item
must be selected? Currently in the MouseDown Event I .GetItem(e.X, e.Y) and
check to see if it is null, if it is then I set the last item in the list to
item.selected=true. Unfortunately, the SelectedIndexChange event is firing 3
times and the last time it fires no item is selected. Any thoughts?
 
D

DBC User

I am not sure this is the correct answer, but what you could do is,
validate an item is selected at the end of the process. Like 'submit'
button. This way, selectindex change will not fire all the time. Just a
thought.
In my case, I have the white space as the first entry and when the form
is loaded, I always select the white space as the selected entry by
default.
 
G

Guest

Thanks for the response, but unfortunately a button is out of the question,
as users select items, there is another window that changes as the select
items, also the legacy code doesn't have a button so I will be overruled.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top