Catching Unselecting All in ListView — SelectedIndexChanged Firing Twice

前端 未结 5 963
面向向阳花
面向向阳花 2021-01-19 21:37

Basically, I have a ListView of items. When one is selected, a text box comes into view on the right to display more details of that item (takes a little time for the item

5条回答
  •  野的像风
    2021-01-19 21:53

    In any control where you can select multiple items, SelectedIndexChanged event fires twice. One, to remove the deselected item and then to add selected item. When you click first time, selected items collection is null and hence it fired once. Next time it will fire twice.

提交回复
热议问题