C# Code:
public void BindData()
{
try
{
string sql = "SELECT * from t_Material_Class";
DataTable dt = Maticsoft.DBUtility.DbHelperSQLite.Query(sql).Tables[0];
treeList1.Nodes.Clear();
treeList1.ParentFieldName = "fParent_Id";
treeList1.KeyFieldName = "fId";
treeList1.OptionsBehavior.Editable = false;
treeList1.DataSource = dt;
treeList1.Columns["fName"].VisibleIndex = 0;
treeList1.Columns["fName"].Caption = "名称";
treeList1.Columns["fRemark"].Caption = "备注";
treeList1.ExpandAll();
}
catch (Exception ex)
{
}
}