Hi guys,
You have in the passed given me help with the subject of drag and drop in a cxGrid.
I have been able to do this successfully in a dxGrid.
I have at times got the example code that you sent me a long time ago to work in a cxGrid. However occasionally when I do the drag and then drop the program freezes (with the mouse arrow having the small white rectangle on it) and I have to close the program down and start it up again.
I have recently started another project and I need to have the drag and drop functionality again to reorder the records in a grid.
I have attached a sample project with the code I use and a dataset component. Unfortunately I am not sure how to send you a SQLServer table, so I have sent a jpg of the table structure.
Table J3Temp is a table used to store records which then get moved for permanent storage to another table.
When I populate J3Temp with records I put into the Sortorder column (as the record gets inserted into the table), the numerical order of the record (1, 2, 3, 4 etc). I do this because the user will select products to put into the table from another table sorted alphabetically on product name. In J3Temp the order of the products needs to be in a non-alphabetical order. J3Temp is ordered on the Sortorder column.
When I try to drag and drop the records to put them into a different order I cannot make make the record move to its new place.
I have spent many hours trying to work out what I am doing wrong and I imagine it is probably something very simple really!
I would really appreciate your help in being able to crack the problem of not being able to get the code in Project 1 to work.
I look forward to hearing from you soon.
Many thanks and best wishes,
Carl
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Thank you for the sample, Carl. However, it seems to lack the referenced unit. Please provide the complete set of files. We'll try to fine-tune your code.
To supply the necessary data, you can send us a backup of your SQL database. We'll restore it on our MSSQL Server.
Thanks,
Serge
Serge,
I hope I have now attached all the info you require.
Thanks for agreeing to take this on.
Best wishes,
Carl
Thank you for the sample, Carl. We're working with it, and will respond as soon as we have any results or need extra information.
Thanks for your patience.
Regards,
Serge
Hi Carl,
Sorry for the late response. It took us some time to fine-tune your sample. I've modifies it to work with an integer order field, and it seems to operate as expected now. The updated sample shows how to implement the described behavior, however, it may require fine-tuning according to your needs.
Please test it, and let me know your results.
NOTE: Adjust the connection string to your local environment.
Thanks,
Serge
Hi Carl,
I've attached the updated sample.
Please review it and inform me whether it meets your requirements.
Thanks,
Dimitros