Author Topic: tree grid and dragg and drop  (Read 460 times)

hirehop

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 43
    • View Profile
tree grid and dragg and drop
« on: September 19, 2023, 04:37:18 pm »
Here i would like to attach my video of tree view grid with drag and drop features
#================
1 - Ctrl + click ------ select multiple rows
2 - click select ------ drag and drop
3-  multiple selected --- drag and drop
4-  could have drag and drop any root node or child node
5- single click select row
6- colleps and expand features

please check below link video

https://drive.google.com/file/d/1fzVtEwdC053lcX15TBlKv-HGcj2h0XpX/view?usp=drive_link

thank you

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: tree grid and dragg and drop
« Reply #1 on: September 20, 2023, 04:24:24 pm »
This example has every feature for your requirement. https://paramquery.com/pro/demos/dnd_tree

To use row selection instead of checkbox selection,

use
Code: [Select]
selectionModel:{type: 'row'},

and change dragModel.dragNodes callback as below:

Code: [Select]
dragNodes: function(rd, evt){             
    var checkNodes = this.SelectRow().getSelection().map(function(obj){
return obj.rowData;
});
    return (checkNodes.length && checkNodes.indexOf(rd)>-1 )? checkNodes: [ rd ];
},

hirehop

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: tree grid and dragg and drop
« Reply #2 on: September 21, 2023, 09:07:48 pm »
Thank you very much

hirehop

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: tree grid and dragg and drop
« Reply #3 on: September 25, 2023, 06:35:18 pm »
Thank you very much its work nice but i wanted to do drag and drop with selected row
becuse right now its dragg and drop with left column 1st column

i wanted to click and hold selected row and then drag and drop

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: tree grid and dragg and drop
« Reply #4 on: September 25, 2023, 10:06:58 pm »
There is no option to make the whole region in row draggable with mouse.

Rows can be dragged only via an icon displayed in number cell or any cell with help of dragModel.diDrag option

https://paramquery.com/pro/api#option-dragModel