Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
125
DragDropBehavior if Ctrl Key is pressed
posted

I'm using DragDropBehavior in a WebDataGrid for each row in this, I need multiple row selection for some other things, but the DragDropBehavior dosen't let me select multiple rows because once I click in a row and move the mouse to make my selection the DragDropBehavior is fire.

The problem is that I need both so I was looking for a solution to this and I look for a way to change the way the DragDropBehavior is fire, like press Ctrl Key to fire it or some other key and let the click or mousedown for selection behavior

Is a way to do this?

Parents
  • 3726
    posted

    Hi

    I do not know which version you are using but we had the same problem when we developed drag & drop feature in web data tree in 10.2. In order to fix this we have developed in 10.2 the following two members of DragDropBehavior object:

     

     

     

     

     

     

     

     

     

     

     

     

     

    set_minimumStartDragShiftX: function(val)

     

     

     

     

    Sets the minimum horizontal shift between mouse-down and mouse-drag points, which triggers start drag action.</summary>

     

     

     

    /// <param name="val" type="Number" integer="true">Shift between mousedown and mousedrag in pixels</param>

     

     

     

    set_minimumStartDragShiftY:

     

    function(val)

     

     

    Sets the minimum vertical shift between mouse-down and mouse-drag points, which triggers start drag action.</summary>

     

     

     

    /// <param name="val" type="Number" integer="true">Shift between mousedown and mousedrag in pixels</param>

     

     

     

     

    Use this to set X and Y offset of 5 to 10 pixels depending on your needs, then D&D will fire when mouse is actually moved. This should work perfectly fine.

Reply Children
No Data