Home > Back-end >  Want to be a dbgrid tree structure shows no ideas for bosses give some ideas
Want to be a dbgrid tree structure shows no ideas for bosses give some ideas

Time:09-15

Inside the dbgrid shows the database data and the data displayed in a tree structure that I know a little do recursive query in the database, but the key I need to make to add and delete in the dbgrid data operations, such as the root node pair insert node do insert to delete the root node and the following child node delete child nodes, and so on the card in the operation

CodePudding user response:

Tree structure itself is not in it, you can use the third party controls, TMS

CodePudding user response:

Want to use the treeview, circulation data set in the treeview item, or use third party dbtreeview

CodePudding user response:

This layer, through the establishment of tree cycle,

CodePudding user response:

SQL:
SELECT 'parent node 1', '
Union all
SELECT "', '1.1 child nodes'
Union all
SELECT "', '1.2 child nodes'
Union all
SELECT the 'parent'
2Union all
SELECT "', '2.1 child nodes'
Union all
SELECT "', '1.1 child nodes'



CodePudding user response:


This is more complex, need to design the structure of the data table, then design a few process: Load, save, Add, Insert, an InsertChild, delete, etc.
  • Related