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

How prevent selectionchanged event during drag drop?

1 Answer 177 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Nadina
Top achievements
Rank 1
Nadina asked on 20 Aug 2013, 12:23 AM
How do I prevent the selction changed event from firing when a listbox item is selected for drag drop?

The main WPF form contains the RadDock. The RadDock has a RadPaneGroup that is docked left. RadPanes containing RadListBox controls are added to this RadPaneGroup based on user selection, an example being a list of customers.

The RadDock has a second RadPaneGroup, and this RadPaneGroup is in the DocumentHost property of the RadDock so that its RadPanes open as tabbed documents.

An example of normal behavior is that a RadListbox containing a list of customers appears in a RadPane that is in the docked left RadPaneGroup. A user selects a specific customer from the list, the selection changed event fires, and the application adds a RadPane to the Document host RadPaneGroup so that details about the selected customer are shown as a tabbed document.

One of the user actions is to create a shopping cart. A menu option is chosen and a RadPane containing the shopping cart information is added to the DocumentHost RadPaneGroup. The first thing that a user needs to do is associate a customer to the shopping cart. The idea is that the user would drag a customer from the RadListbox contained in a docked left RadPane onto the RadPane that is in the document host RadPaneGroup and shown as the currently active tabbed document.

My problem is that when I left click and hold down the mouse button to drag an item out of the RadListbox that is in the docked left RadPaneGroup, the RadListbox selection changed event fires, which then opens a customer details RadPane in the tabbed document DocumentHost area; the shopping cart is no longer visible because it is no longer the active tab.

The desired behavior is that the RadListbox selection changed event does not fire during a drag / drop operation so that I can drag the selected customer from the RadListbox contained within the docked left RadPane onto the empty shopping cart RadPane that is displayed as a tabbed document in the DocumentHost.

Do you have any vb.net examples, or documentation that would explain the desired behavior?

1 Answer, 1 is accepted

Sort by
0
Rosen Vladimirov
Telerik team
answered on 22 Aug 2013, 03:57 PM
Hi Nadina,

May I ask you for more details on the Drag-Drop scenario are you using our ListBoxDragDropBehavior or you have created your own implementation of DragDrop events? If you are using the events, do you handle them?

I'm looking forward to hearing from you.

Regards,
Rosen Vladimirov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
ListBox
Asked by
Nadina
Top achievements
Rank 1
Answers by
Rosen Vladimirov
Telerik team
Share this question
or