Hello,
I am catching MouseLeftButtonUp event. I select multiple items and then select one item from that multiple selected item (The focus and selection is now in one item). When MouseLeftButtonUp fires, it still displays the multiple selection count in SelectedItems.count. Is it a bug? how to do a work around? Thanks in advance. I am using file version 2015.2.728.45 Telerik.Windows.Controls.dll.
5 Answers, 1 is accepted
I tried a similar solution with the selection of items on my side and I was not able to reproduce the problem. SelectedItems.Count always returns the correct value. Attached you can find the project I used for the test. Note, that the MouseLeftButtonUp event is handled internally by RadGridView.
Can you please explain your intention to handling the event?
Martin Vatev
Telerik
Hello Martin Vatev,
Thank you for the replay. You are right. MouseLeftButtonUp does return the currect SelecteItems.Count. I was firing the PreviewMouseLeftButtonUp. I have fixed the code.
used PreviewMouseLeftButtonUp. How can I send the Project to you to check the problem?
Instead of using PreviewMouseLeftButtonUp and MouseLeftButtonUp events I recommend you to use SelectionChanged event. When it fires, it displays the correct count in SelectedItems.count.
I hope this helps.
Regards,
Martin Vatev
Telerik
Thanks Martin. I have already got a solution from your support team.
telerik_RadTreeListView.AddHandler(Control.MouseLeftButtonUpEvent, new MouseButtonEventHandler(this.telerik_RadTreeListView_MouseLeftButtonUp), true);
Now the even is firing properly.