I am trying to implement drag-and-drop from a ListGrid to a TreeGrid, and I am failing miserably. I've successfully implemented drag and drop from the tree to the list, but when dragging from the list to the tree I get a js exception thrown at me saying that isc.EH.dragTarget.getData isn't a function.
On the treegrid side I have a onFolderDrop handler that takes care of stuff that's being dropped on the tree, and on the listgrid side I have a onRecordDropHandler. However, when dragging from the list to the tree the onFolderDrop method is never entered, it blows up before that.
TreeGrid dnd settings:
ListGrid dnd settings:
JS exception:
I'm running gwt 2.1 with smartgwt 2.2 (the build from last Thursday) in development mode on Windows 7 using Firefox 3.6.6.
Thankful for your help.
On the treegrid side I have a onFolderDrop handler that takes care of stuff that's being dropped on the tree, and on the listgrid side I have a onRecordDropHandler. However, when dragging from the list to the tree the onFolderDrop method is never entered, it blows up before that.
TreeGrid dnd settings:
Code:
grid.setDragDataAction(DragDataAction.MOVE); grid.setCanAcceptDroppedRecords(true); grid.setCanReparentNodes(true); grid.setCanDragRecordsOut(true); grid.setCanReorderRecords(true);
Code:
grid.setCanAcceptDroppedRecords(true); grid.setCanDragRecordsOut(true); grid.setCanReorderFields(true);
Code:
11:03:11.155 [ERROR] [topicoverview] 11:03:11.167:MUP2:WARN:Log:TypeError: isc.EH.dragTarget.getData is not a function TreeGrid.drop(event=>{Obj}, eventInfo=>undef) Canvas.handleDrop(_1=>{Obj}, _2=>undef) [c]EventHandler.bubbleEvent(_1=>{Obj}, _2=>"drop", _3=>undef) [c]EventHandler.handleEvent(_1=>{Obj}, _2=>"drop") [c]EventHandler.handleDragStop() EventHandler._handleMouseUp([object MouseEvent], undef) [c]EventHandler.handleMouseUp(_1=>[object MouseEvent]) [c]EventHandler.dispatch(_1=>isc_c_EventHandler_handleMouseUp, _2=>[object MouseEvent]) anonymous([object MouseEvent]) unnamed() com.smartgwt.client.core.JsObject$SGWT_WARN: 11:03:11.167:MUP2:WARN:Log:TypeError: isc.EH.dragTarget.getData is not a function TreeGrid.drop(event=>{Obj}, eventInfo=>undef) Canvas.handleDrop(_1=>{Obj}, _2=>undef) [c]EventHandler.bubbleEvent(_1=>{Obj}, _2=>"drop", _3=>undef) [c]EventHandler.handleEvent(_1=>{Obj}, _2=>"drop") [c]EventHandler.handleDragStop() EventHandler._handleMouseUp([object MouseEvent], undef) [c]EventHandler.handleMouseUp(_1=>[object MouseEvent]) [c]EventHandler.dispatch(_1=>isc_c_EventHandler_handleMouseUp, _2=>[object MouseEvent]) anonymous([object MouseEvent]) unnamed() at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:501) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157) at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1668) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222) at java.lang.Thread.run(Thread.java:595)
Thankful for your help.
Comment