此问题来自论坛,实现TreeView递归添加接点的主要思路是,数据表的设计,数据表应该有三个字段:"NodeID","Name",和"ParentID".
using
System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace MyTest
... {
public partial class Form1 : Form
...{
public DataTable dt = new DataTable();
public DataSet ds = new DataSet();
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace MyTest
... {
public partial class Form1 : Form
...{
public DataTable dt = new DataTable();
public DataSet ds = new DataSet();