[dhtmlxTreeGrid] Moving nodes (dnd) with dataprocessor

Hello guys,

I’m currently facing a major issue with a treegrid component with a dataprocessor attached.

Indeed, with drag and drop on, when you’re trying to move a row into another level of hierarchy, dataprocessor understand this as a insert AND delete operation !

As no datas (at least no database datas) have been modified, It doesn’t have any sense !

Even worse, destroying rows and inserting new identical ones just make unique id in the database fly through the ceiling in no time.

Thing is I have to keep track of the hierarchy (treegrid component is a part of virtual file system application) and I was implementing a ‘onDrop’ custom event to deal with changes.

Is there any method to ‘desactivate’ dataprocessor on moving up or down nodes in hierarchy ?

I have a look at this issue :

dhtmlx.com/docs/products/kb/inde … aprocessor

But It doesn’t resolve my problem as It stills making new rows.

I’ve tried to switch off ‘setUpdateMode’, but dataprocessor still catch the event (row striked and new row not processed).

Any quick thought ?

The second option of setUpdateMode (discussed in mentioned post ) supported only be relative new versions of dataprocessor, so in your case problem may be caused by old version. ( if option used, d-n-d inside the same grid will be counted as “update” operation)
Latest version of dataprocessor sent by email, you can try to use it and set the second parameter of setUpdateMode as true.

>>Is there any method to ‘desactivate’ dataprocessor on moving up or down nodes in hierarchy ?
Dataprocessor uses events of grid, generated during d-n-d, so it is quite problematic to disable only d-n-d reaction, while having all other functionality in place.
Can be done by code modification only , please inform if you need details about exact places, which need to be updated.

Thanks for your quick answer.
Haven’t received anything in my mail until now, though.
I’m gonna try the ‘second option of setUpdateMode’ method before going for a code modification.

Latest dataprocessor version seems to do the trick :slight_smile:
Thanks again for your, as always, dedicated support.