Author Topic: dropModel->drop prevents dropping of nodes  (Read 2108 times)

Autoflow

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 21
    • View Profile
dropModel->drop prevents dropping of nodes
« on: April 30, 2019, 04:23:21 pm »
Hi.

Just noticed within your examples that setting a drop callback on dropModel prevents nodes from beeing moved:

$("#dndgrid").pqGrid({
            height: 500,
            autoRow: true,
            dataModel: dataModel,
            complete: function () {
                this.flex();
            },
            dragModel:{
                on: true,
                diHelper:['OrderID']
            },
            dropModel:{
                on: true,
      drop: function(evt, ui) { alert('node(s) won'n not moved with me ..'); return true; }
            },
            //pageModel: { type: 'local', rPP: 20, rPPOptions: [1, 10, 20, 30, 40, 50, 100] },
            colModel: columns,                       
            title: "Shipping Orders"           
        });       

Is this a bug ?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6122
    • View Profile
Re: dropModel->drop prevents dropping of nodes
« Reply #1 on: May 06, 2019, 04:47:01 pm »
drop callback is used to implement custom logic of move rows.

it's used in this example of drag and drop between grid and other component: https://paramquery.com/pro/demos/dnd_other