Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by n.darques on Mar 09, 2009 11:09
open dhtmlx forum
[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 :
http://dhtmlx.com/docs/products/kb/index.shtml?cat=search&page=1&q=7031&ssr=yes&s=drop%20treegrid%20dataprocessor
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 ?
Answer posted by Support on Mar 10, 2009 04:24
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. 
Answer posted by n.darques on Mar 10, 2009 06:09
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.

Answer posted by n.darques on Mar 10, 2009 10:22
Latest dataprocessor version seems to do the trick :)
Thanks again for your, as always, dedicated support.