Distinguish between multiple grids in onDrag / onDrop events

I’m working with drag-and-drop in DHTMLX Grid.When there are multiple source grids for dragging, or multiple target grids for dropping, how can I identify which exact grid the drag/drop event comes from or goes to?

I need to distinguish between different grids during the onDrag, onDrop, or related events.

Hello @jyginger,

There is no some built-in option for that, but it easily can be done with internal events, for example with dragRowStart:

The solution could be to use this listener on each grid, and assign some “specific” flag value based on which grid drag was started, something like follows:

let flag; 
gridSource.events.on("dragRowStart", (data, event) => {
    flag = "grid1"
});
gridBoth.events.on("dragRowStart", (data, event) => {
    flag = "grid2"
});

Kind regards,