Home > Back-end >  Delphi or VFP how to realize the tree structure to move?
Delphi or VFP how to realize the tree structure to move?

Time:10-06

CodePudding user response:

First look at your tree structure is how to store
Pid, id
Or
Rootid, id, level, order
?

If directly using the treeview, mobile, it is very simple things

CodePudding user response:

Don't know what's the matter with your database is set up, my tree structure in the database, to store the three fields: node, the parent node, serial number,
With these, I want to move was made clear, such as moving to the next higher level, so, his parent node, to the higher level of the parent node; Relative movement to the next level, the parent node, change accordingly; If moving within the same level, change the serial number, of course, this is just a simple said the train of thought,
  • Related