不行呀。同志们,我用的是C#
public void updatetreeview()
{this.treeView1.BeginUpdate();
this.treeView1.Nodes.Clear();
foreach(DataRow row1 in ds.Tables["department"].Rows)
{
动态添加的结点
}
this.treeView1.endUpdate();
}
public void updatetreeview()
{this.treeView1.BeginUpdate();
this.treeView1.Nodes.Clear();
foreach(DataRow row1 in ds.Tables["department"].Rows)
{
动态添加的结点
}
this.treeView1.endUpdate();
}
应该可以的 你再试试
你的Clear应该放在最后才有效。这么久也不结贴?