This is a migrated thread and some comments may be shown as answers.

SelectedItems.count do not change making single selection after multiple selection.

5 Answers 125 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Riyadh
Top achievements
Rank 1
Riyadh asked on 10 Sep 2015, 10:01 AM

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

Sort by
0
Martin
Telerik team
answered on 12 Sep 2015, 11:24 AM
Hi Riyadh,

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?

Regards,
Martin Vatev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Riyadh
Top achievements
Rank 1
answered on 14 Sep 2015, 06:24 AM

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.

0
Riyadh
Top achievements
Rank 1
answered on 14 Sep 2015, 07:22 AM
However the MouseLeftButtonUp event is not firing. That is the reason I
used PreviewMouseLeftButtonUp. How can I send the Project to you to check the problem?
0
Martin
Telerik team
answered on 15 Sep 2015, 10:32 AM
Hi Riyadh,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Riyadh
Top achievements
Rank 1
answered on 15 Sep 2015, 10:52 AM

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.

 

Tags
TreeListView
Asked by
Riyadh
Top achievements
Rank 1
Answers by
Martin
Telerik team
Riyadh
Top achievements
Rank 1
Share this question
or