Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • HI,

                                    I have been researching on how to drag one cell from one grid to another cell on another grid unsuccesfully. Both cells same data type.

                                    I have found article Q181962 referring to dragging cells on the same grid and many others on how to move whole rows from one grid to another.

                                    I am attaching a project where I present two grids and I want to move the DateTime cell from the left grid to the Start (or End) cell on the right grid.

                                    I would appreciate some sample code as I have tried mouse down, mouse up, drag enter, drag over, drag drop, etc. and cannot get it to work.

                                    Thank you very much.

                                CellToCell.zip
                                0

                                Hi Joe,

                                Thank you for the question. A similar task has already been discussed in the Drag-and-drop data rows from one grid to another knowledge base article. I have also updated your sample based on this article. Please review it and inform me whether it meets your requirements.

                                Thanks
                                Dimitros

                                dxSample.zip
                                0

                                Hi Dimitros,

                                The sample is excellent and works as expected.

                                I have one more favor to ask:

                                Is it possible to differentiate moves between grid 1 (on left) and grid 2 (on right) as opposed to moves between cells within the same grid?

                                Here is why, If I drag a cell from grid 1, I want to copy it to grid 2, but if I drag a cell from grid1 > Start to grid1 > End (or viceversa) then I want to move it.

                                Thank you very much for your prompt and accurate assistance.

                                0

                                Hi Joe,

                                I'm glad to hear that my assistance was helpful to you:)
                                Concerning your question: I can suggest the following approach:
                                1. Save a source View and cell within the MouseDown event handler.
                                2. Within the DragDrop event handler, check if the source View is not equal to a target View, and if so, clear the content of the source cell.

                                Attached is an updated sample illustrating how this can be implemented.

                                Thanks
                                Dimitros

                                dxSample.zip
                                0

                                Hi Dimitros,

                                Your help has been impeccable and invaluable.

                                Congratulations on a job well done and on an excellent response time!

                                0

                                You're welcome, Joe :) Please feel free to contact us in case of any difficulty. We are happy to help you at any time.

                                Dimitros

                                To start a chat you should create a support ticket


                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners