Author Topic: Implement draggable with option: clone  (Read 1492 times)

[email protected]

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 2
    • View Profile
Implement draggable with option: clone
« on: April 10, 2020, 11:38:00 pm »
I need to be able to drag a row from one grid to another grid without have it removed from the first grid. I tried using JQuery to set the option helper to clone, but the grid threw an exception. Is there a way to do this in pqGrid?

Thanks
JHosier

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Implement draggable with option: clone
« Reply #1 on: April 13, 2020, 09:16:38 am »
JHosier

pqGrid has its own API to support drag and drop of rows.

Ex: https://paramquery.com/pro/demos/dnd_grids

Quote
I need to be able to drag a row from one grid to another grid without have it removed from the first grid.

For this add an empty implementation of dragModel.beforeDrop callback in first grid.

Code: [Select]
dragModel:{
                on: true,
                clsDnD: 'dnd1',
                diHelper:['OrderID'],
beforeDrop: function(){

}
},

https://jsfiddle.net/x84wmesa/