I have grid with multiple subgrids. I need to be able to drag rows (change their order essentially) inside of each subgrid, but not between subgrids. How can I achieve that?
You can include following lines at the sub grid configuration:
…
true
Thank you, but how can I prevent drag-and-drop between grids? I need rows to be draggable only inside their own grid.
Please check this article how to manage Drag and Drop in Grid dhtmlx.com/docs/products/dhtmlxG … rid_mandnd
I read the article. It probably answers my question by omission. Let me ask again - is there any property or parameter that I can use to make sure that drag-and-drop is only allowed inside of the grid, but not between grids? Or do I need to re-define “onDrag” even to block dropping in another grid? If I do need to redefine it, how can I do that for subgrids? Is there a way to do that in xml?
The only way to disable drag-n-drop betwenn grid is to use “onDrag” event.
How can I attach “onDrag” handler to a sub grid?
You can use “onSubGridCreated” event:
grid.attachEvent(“onSubGridCreated”,function(sub,id,ind,value){
sub.attachEvent(“onDrag”,function(){});
return true;
})