Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by richard on Jun 13, 2008 10:38
open dhtmlx forum
drop and drag bug

Hi

i have noticed a bug and wondered whether you have come across it

this is how i got the error:

i loaded an xml file into a treegrid with just a tree as the 1 and only column

i also used the enableSmartXMLParsing command

i then have a tree on the other side of the interface

they both have drop and drag and i can drop and drag items from the grid into the tree.

however if i have not previously opened a folder and then try to drag a folder to it, but in the ondrag event i do some processing and return false instead of true for some reason the folder in the tree opens and that folders row turns red

is this a bug you have found and is there a fix, if not how can i get round this?

thanks
Answer posted by Support on Jun 16, 2008 01:38
a) both Tree and TreeGrid components have auto-opening while d-n-d as default functionality ( if you drag some item over folder and wait a sec - folder will be automatically expanded )
b) the red color used as drop target marker, while working with TreeGrid in drop-as-child mode. In case of normal d-n-d processing the red marker removed after finishing d-n-d ( without relation to result of onDrag event )

The problem in your case may be caused by some js error in code attached to onDrag event, if such error occurs it will prevent correct finalization of d-n-d process, which may result in mentioned errors
( One more possible situation - usage of non-unique IDs, but it pretty hard to achieve such situation in case of TreeGrid )

If problem still occurs for you - please send any kind of sample to support@dhtmlx.com ( or link to the page, where issue can be reconstructed )
Answer posted by richard white on Jun 16, 2008 05:04
hi,

this problem occurs if i have an alert box just before the return false in the ondrag event

my code checks if something is true and if not then it displays an alert box to the user stating what the error is and then returns false

in the situation the red drop marker highlights the row they were attempting to drag down

if you cannot replicate this i will send you sample code, please let me know

thanks
Answer posted by Support on Jun 16, 2008 06:03