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 valuesThen try the treeview control, while you were reading the database dynamically generated nodes
CodePudding user 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
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: