dunham Posted March 14, 2016 Share Posted March 14, 2016 Hi , i would like to drag & drop rows between two grids , here is the code i used , it seems i forgot something , if some one could help me to fix it please //in first grid: function beforeInit(sender, config) { config.listeners = { plugins: { ptype: 'gridviewdragdrop', dragGroup: 'secondGridDDGroup', dropGroup: 'firstGridDDGroup' }, listeners: { drop: function(node, data, dropRec, dropPosition) { var dropOn = dropRec ? ' ' + dropPosition + ' ' + dropRec.get('name') : ' on empty view'; } } } } //second grid function beforeInit(sender, config) { config.listeners = { plugins: { ptype: 'gridviewdragdrop', dragGroup: 'firstGridDDGroup', dropGroup: 'secondGridDDGroup' }, listeners: { drop: function(node, data, dropRec, dropPosition) { var dropOn = dropRec ? ' ' + dropPosition + ' ' + dropRec.get('name') : ' on empty view'; } } } } G2G.zip Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 14, 2016 Share Posted March 14, 2016 Hi, I was not able to run your test case, Seems, should be so: config.viewConfig = { plugins: { ptype: 'gridviewdragdrop', ... Best regards. Quote Link to comment Share on other sites More sharing options...
dunham Posted March 14, 2016 Author Share Posted March 14, 2016 Hi, I was not able to run your test case, Seems, should be so: config.viewConfig = { plugins: { ptype: 'gridviewdragdrop', ... Best regards. Thank you , it works ! i'm searching now how to detect the drop event . Quote Link to comment Share on other sites More sharing options...
dunham Posted March 14, 2016 Author Share Posted March 14, 2016 im' trying to detect the start drag event using : unisession.AddJS('var yg = document.getElementById(MainForm.Grid1.id);'); unisession.AddJS('function dragStart(evt){ ajaxRequest(sender,"drag an item");}'); unisession.AddJS('yg.draggable = true;'); unisession.AddJS('yg.addEventListener("dragstart", dragStart, false); '); it say yg is null Quote Link to comment Share on other sites More sharing options...
du1000brazil Posted September 13, 2016 Share Posted September 13, 2016 Hello I wonder how I do it by inserting and deleting a temporary table and dynamically ... as drag and drop. in the case using a firedac component TFDMemTable Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.