i'm trying to use a listview control. i need to use the selectedIndexChanged event and was calling a debug.writeline in the event to confirm its behavior when clicking between items. i was surprised to find that each time i click on a new item in the listview control, the selectedIndexChanged event is getting fired twice. once with a selected index count of 0 and then a selected index count of 1.
does anyone know if this is normal behavior for this control and event? more of an issue for me is how the selectedIndexChanged event fires when clicking on a single item after having previously selected multiple items using the ctrl key. in this case, it fires three times, once for an item from the previously selected group, once for no items selected and once for the newly selected item.
in this case, how are you suppose to distinguish between the first firing that is associated with an item that is in fact not selected with the third firing that is for the correct item?
thanks,
glenn
does anyone know if this is normal behavior for this control and event? more of an issue for me is how the selectedIndexChanged event fires when clicking on a single item after having previously selected multiple items using the ctrl key. in this case, it fires three times, once for an item from the previously selected group, once for no items selected and once for the newly selected item.
in this case, how are you suppose to distinguish between the first firing that is associated with an item that is in fact not selected with the third firing that is for the correct item?
thanks,
glenn