rhennink Posted January 16 Share Posted January 16 Hi! I'm looking for a solutation to drag-and-drop a cell between 2 stringgrids. Does anyone have a solution for his one? RIchard Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 17 Share Posted January 17 Hello @rhennink Sorry, we had an unfinished post about this before: So here's the solution for you (simple implementation): 1. initialization UniAddCSSLibrary('build/packages/ux/classic/classic/resources/ux-all.css', False, [upoFolderJS, upoPlatformDesktop]); UniAddJSLibrary('build/packages/ux/classic/ux.js', False, [upoFolderJS, upoPlatformDesktop]); 2. First StringGrid.ClientEvents.UniEvents -> function beforeInit(sender, config) { config.viewConfig = { plugins: { ptype: 'celldragdrop', ddGroup: "StringGridDD", // remove text from source cell and replace with value of emptyText applyEmptyText: false, dropBackgroundColor: Ext.themeName === 'neptune' ? '#a4ce6c' : 'green', noDropBackgroundColor: Ext.themeName === 'neptune' ? '#d86f5d' : 'red', // will only allow drops of the same type enforceType: true, enableDrop: false, enableDrag: true, } } } 3. Second StringGrid.ClientEvents.UniEvents -> function beforeInit(sender, config) { config.viewConfig = { plugins: { ptype: 'celldragdrop', ddGroup: "StringGridDD", // remove text from source cell and replace with value of emptyText applyEmptyText: false, dropBackgroundColor: Ext.themeName === 'neptune' ? '#a4ce6c' : 'green', noDropBackgroundColor: Ext.themeName === 'neptune' ? '#d86f5d' : 'red', // will only allow drops of the same type enforceType: true, enableDrop: true, enableDrag: false, } } } Quote Link to comment Share on other sites More sharing options...
rhennink Posted January 17 Author Share Posted January 17 Hi Sherzod, this is really great!!!, and my test-project is really working great!!!! THNX! can you help me with one simple thing? I would like to see which cell has moved from the source-position/grid to the new position/grid. Then I can create some logic in my code to do some data-processing. thnx!!! RIchard Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 17 Share Posted January 17 10 minutes ago, rhennink said: I would like to see which cell has moved from the source-position/grid to the new position/grid. Then I can create some logic in my code to do some data-processing. I will try to check. Quote Link to comment Share on other sites More sharing options...
rhennink Posted January 18 Author Share Posted January 18 AH!! would be really great!! thnx in advance! 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.