Home > Back-end >  Tree node Delphi how to display a column data in the database
Tree node Delphi how to display a column data in the database

Time:09-15




As shown, this column is 1 subjects in the database code, I would like to send this list all the subject code displayed in the form of a tree,
What good method is the list of all the subjects are extracted from the code, according to the point of nodes, and then displayed in the form of a tree

CodePudding user response:

Group by in SQL statements in the list of all values
Then try the treeview control, while you were reading the database dynamically generated nodes

CodePudding user response:

https://download.csdn.net/download/tanqth/12810130
Read your question, just upload a long, long ago it yourself control DBTREE, can completely meet the requirements of you, you can download to learn,
BDtree

Is mainly used in the coding of the tree, according to the database has a code, a name, and code can be used in two ways,
Grade 1, coding (treecodeformat) : such as 224, length coding for two means level, level 2 length is 2, level 3 length is four, the fourth length, code or to 9th largest, level 1 is minimum,
2, the separator (treecoedseperate) : available characters for each level of the separator, to the characters in the space, such as with a '-',

JsDbTree1. The DataSource:=coding database;
JsDbTree1. DataField:=show coding using field;
JsDbTree1. McData:=display name field;
JsDbTree1. Images:=show the picture of the tree;
After JsDbTree1. Menu:=Menu button shows the Menu;
JsDbTree1. Title. Caption:=tree name (Title);
JsDbTree1. TreeCodeFormat:=coding format level coding way;
JsDbTree1. TreeCodeSeperate:=way of separator separator characters;
JsDbTree1. TreeName:=root of a tree;
JsDbTree1. ButtonMenuVisible:=whether display menu button;
Whether JsDbTree1. ButtonCloseVisible:=show close button;
JsDbTree1. ButtonRefreshVisible:=whether display refresh button;
JsDbTree1. OnTreeChange:=option change when the tree;
JsDbTree1. Refresh TreeRefresh=control tree;

CodePudding user response:

refer to the second floor tanqth response:

https://download.csdn.net/download/tanqth/12810130Read your question, just upload a long, long ago it yourself control DBTREE, can completely meet the requirements of you, you can download to learn,
BDtree

White blind, it is estimated that he didn't download COINS,

CodePudding user response:

reference 4 floor of the autumn leaves response:
Quote: refer to the second floor tanqth response:

https://download.csdn.net/download/tanqth/12810130Read your question, just upload a long, long ago it yourself control DBTREE, can completely meet the requirements of you, you can download to learn,
BDtree

White blind, it is estimated that he didn't download COINS,


Don't download before COINS, under the system will be combined with COINS,
  • Related