ListView SelectedIndexChanged event not fired when ListViewItem is selected programatically

Welcome to Wisej Support.
Questions, suggestions and plain old bugs - are all welcome here!
0
0

Hello, when selecting a listviewitem programmatically:

listView1.Items[1].Selected = true;

the listview selects the item, but the SelectedIndexChanged event is not fired.  I confirmed that this should be happening in a windows form app.  I’m using the latest version (1.3.14)

Thanks,
Andrew

 

  • You must to post comments
0
0

Hi Andrew,

WJ-7834 is also included in the latest Wisej build (1.3.15).

Best regards
Frank

  • You must to post comments
0
0

You are correct. It fires ItemSelectionChanged but it doesn’t fire SelectedIndexChanged (which is related to the FocusedItem getting updated only by a user action on the client).

WJ-7834: The ListView doesn’t fire SelectedIndexChanged and doesn’t update the FocusedItem when changing the selection programmatically.

Thanks,

Luca

 

  • redcard
    Thanks again for the fast response!
  • Luca (ITG)
    As a workaround you can set the Focused item: this.listView1.Focuseditem = this.listView1.Items[1]; or this.listView1.Items[1].Focused = true.
  • Andrew
    Also, listView1.Items[0].Selected = true does not update Listview1.SelectedIndex (which I am trying to read in the SelectedIndexChanged event)
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.