M
Mark Smith
I have a single-selection ListView where I always want to keep an item
selected by default. If the user clicks in the empty area below the
items, I want to select the first item.
It appears that when the user selects a new item, two
SelectedIndexChanged events are fired: one with no SelectedItems, and
then one with the new SelectedItem. Because of that, I can't tell if
an event with no selection is because the user clicked outside the
list items (and I should select the first one) or because they
selected another item (and I shouldn't).
Does anyone know a workaround for this?
selected by default. If the user clicks in the empty area below the
items, I want to select the first item.
It appears that when the user selects a new item, two
SelectedIndexChanged events are fired: one with no SelectedItems, and
then one with the new SelectedItem. Because of that, I can't tell if
an event with no selection is because the user clicked outside the
list items (and I should select the first one) or because they
selected another item (and I shouldn't).
Does anyone know a workaround for this?