This seems like it should be something fairly simple, but I just can't seem to get it to work.
I'd like to programatically clear the selection of the currently selected item in my ListView.
I've tried setting SelectedValue to null, setting SelectedItem to null, setting the SelectedIndex to -1, and even tried calling the UnselectAll method. In each and every case, SelectedItems.Count is still equal to one...
Any ideas?
You must put it into an empty collection
ListView.UnselectAll();
I have read the question again. If it does not work, then the problem may be with binding. Is the ListView
bound??
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With