locked
ListView: (De-)select notifications in virtual mode RRS feed

  • Question

  • I have a ListView control in virtual mode, single selection only. I need to get an event when the selected item changes, or the selection is removed.

    So far I found out:

    SelectedIndexChanged: It's hard to find the selected item (lv.SelectedItems isn't accessible in virtual mode), and it probably doesn't give me a "deselect" event

    ItemSelectionChanged: receives only "selected" events in virtual mode (used to get both "select" and "deselect" in non-virtual mode)

    VirtualItemsSelectionRangeChanged: receives only "deselected" events(e.IsSelected is never true, even if I remove the other handlers completely)

    When I put the respective code in both handlers, everything works, but it feels weird. Am I doing something wrong?

    Tuesday, August 8, 2006 11:07 PM

Answers

  • Hi,

    I feel there is nothing weird in it since both are meant for different purposes and you have to check both scenarios.

    Thank you,
    Bhanu.

    Wednesday, August 9, 2006 9:22 PM

All replies

  • anyone?
    Wednesday, August 9, 2006 8:33 PM
  • Hi,

    I feel there is nothing weird in it since both are meant for different purposes and you have to check both scenarios.

    Thank you,
    Bhanu.

    Wednesday, August 9, 2006 9:22 PM