Board index » cppbuilder » DBGrid, drag'n'drop
Peter Valkam
![]() CBuilder Developer |
Mon, 28 Apr 2003 03:00:00 GMT
|
Peter Valkam
![]() CBuilder Developer |
Mon, 28 Apr 2003 03:00:00 GMT
DBGrid, drag'n'drop
1) How can I let the user change the order of records in a DBGrid by
drag-and-drop? 2) How can I let the user drag-and-drop records from one DBGrid to another, i.e. from one underlaying Paradox-table to another? Thanks in advance! pv |
Team
![]() CBuilder Developer |
Mon, 28 Apr 2003 03:00:00 GMT
Re:DBGrid, drag'n'dropHi, Pv! The idea of sequentiality is absent from relational databases, which In that case, then, you must identify the record before / after the drop As for drag and drop between tables, well, you can interpret the dragged If that is the case, the dragged object that will be dropped is the I hope this gives you some ideas. If you have further specific ------ |
Peter Valkam
![]() CBuilder Developer |
Tue, 29 Apr 2003 03:00:00 GMT
Re:DBGrid, drag'n'dropThank you Mark, that was very useful information. I'm a beginner, and well, now I'm afraid I've taken the wrong approach in this project. I certainly don't want to write a thousand lines to enforce sequentiality! Here's what I'm trying to do: I have a music database in the form of a Paradox table in which the most I tried a string grid in stead of a DBGrid, but I had difficulties Any suggestions? PV Quote"Mark Cashman (TeamB)" wrote: |
Mark Cashma
![]() CBuilder Developer |
Fri, 02 May 2003 03:00:00 GMT
Re:DBGrid, drag'n'dropIf you don't need to maintain a database, you can use a TStringGrid, and save / load the playlist using its LoadFromFile / SaveToFile methods. There are fairly simple ways to move rows in a TStringGrid, basically by deleting, copying, and inserting rows. You may find it even easier (if you don't need multiple columns) to just use a TListBox. ------ |
Peter Valkam
![]() CBuilder Developer |
Sat, 03 May 2003 03:00:00 GMT
Re:DBGrid, drag'n'dropThanks again, Mark ! |