日期:2014-05-17 浏览次数:20817 次
for (int i = 0; myDataSet.Tables[0].Rows.Count > i; i++)
{
MessageBox.Show(i.ToString());
MessageBox.Show(myDataSet.Tables[0].Rows.Count.ToString());
TreeNode node = new TreeNode(myDataSet.Tables[0].Rows[i][1].ToString());
MessageBox.Show(node.Text);
//node.Tag = myDataSet.Tables["clientType"].Rows[i]["id"].ToString();
for (int m = 0; m < this.treeView1.Nodes.Count; m++)
{
TreeNode pnode = this.treeView1.GetNodeAt(m, 0);
if (pnode.Text == "代购")
{
pnode.Nodes.Add(node);
}
}
}