In. NET, to implement the TREEVIEW in the C/S architecture, you only need to enter the table name, parent ID, node ID, and node name to obtain the tree.

Source: Internet
Author: User

The call time is as follows:
/// <Param name = "newTreeView"> tree control name </param>
/// <Param name = "TreeViewName"> function name of the layer </param>
/// <Param name = "TableName"> name of the table in the database </param>
/// <Param name = "ParentNameField"> Field name of the parent node </param>
/// <Param name = "CurrentNameField"> node field name </param>
/// <Param name = "CurrentDataField"> node data </param>

NewTreeInfoBll. InitTreeData (this. treeView1, "system business table", "T_S_SystemTableIndex", "pid000", "name00", "id0000 ");
If you do not understand anything or do not understand anything, please send me an EMAIL. Thank you. I hope you can make progress together.
---------------------------------
TREEINFO. CS = Data Control Layer
Using System;
Using System. Windows. Forms;
Using System. Data;
Using System. Data. SqlClient;
Namespace DAL
{
/// <Summary>
/// TreeInfo
/// All information of the tree-based initial database
/// Joe peak
/// Function: implement initial activation of all trees
/// </Summary>
Public class TreeInfo
{
// Private string PARM_TableName;
/// <Summary>
/// Retrieve all data of a table (the table name is missing)
/// </Summary>
Private string SQL _SELECT_TREE = "SELECT * FROM ";

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.