How prevent selectionchanged event during drag drop?

2 posts, 0 answers
  1. Nadina
    Nadina avatar
    9 posts
    Member since:
    Jul 2012

    Posted 19 Aug 2013 Link to this post

    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 examples, or documentation that would explain the desired behavior?
  2. Rosen Vladimirov
    Rosen Vladimirov avatar
    640 posts

    Posted 22 Aug 2013 Link to this post

    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.

    Rosen Vladimirov
    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 >>
Back to Top