Grid drag/drop multiple rows

Posted by: eberg on 8 January 2018, 11:09 am EST

    • Post Options:
    • Link

    Posted 8 January 2018, 11:09 am EST

    We are trying to accomplish dragging and dropping multiple rows. It kinda works but we are having trouble with the row selection.

    As soon as you select the selected rows for dragging, the row you clicked on gets deselected. Is there something we can do about this without rewriting the mousedown/up functions?

  • Posted 9 January 2018, 2:16 am EST

    Hi Eberg,

    You need to set AllowDragging property to “Both”/“Rows” to prevent selection of Rows/Cells on mousedown.

    To drag rows in FlexGrid, you need to use FlexGrid rowHeader.

    ~Manish

  • Posted 9 January 2018, 5:29 am EST

    Is it possible to drag them without using the rowHeader?

  • Posted 10 January 2018, 3:22 am EST

    Hi,

    The Drag can be also done without using rowHeader using FlexGrid cell/Row. This require FlexGrid’s mousedown, drag and drop event.

    Please have a look at the following fiddle for the same:

    http://jsfiddle.net/mkgupta911/ozn86heo/

    ~Manish

  • Posted 15 January 2018, 3:59 am EST

    We want that to be combined with the ability to select cells. But I guess thats not possible because of the mousedown override?

  • Posted 16 January 2018, 12:40 am EST

    Hi,

    Yes, with current design behavior it is not possible. But you may override mousedown event as per your requirement. Please refer to the following code snippet for the same:

    theGrid.hostElement.addEventListener("mousedown",function(e){
    	e.preventDefault();
    },true)
    

    ~Manish

  • Posted 16 January 2018, 4:01 am EST

    Thank you for your information

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels