C#TreeViewAdv-动态添加列

C#TreeViewAdv-动态添加列,c#,treeview,multiple-columns,C#,Treeview,Multiple Columns,我正在使用TreeViewer。我知道如何创建具有固定数量列的树。我在表单中删除树视图,并添加列和节点控件 private class ColumnNode: Node { public string NodeControl1=""; // This should make the DataPropertyName specified in the Node Collection. public string NodeControl2 = "";

我正在使用TreeViewer。我知道如何创建具有固定数量列的树。我在表单中删除树视图,并添加列和节点控件

 private class ColumnNode: Node
    {
        public string NodeControl1="";  // This should make the DataPropertyName specified in the Node Collection.
        public string NodeControl2 = "";
        public string NodeControl3 = "";
        public ColumnNode(string nodeControl1, string nodeControl2, int nodeControl3)
            : base(form)
        {
            NodeControl1 = nodeControl1;
            NodeControl2 = nodeControl2;
            NodeControl3 = nodeControl3.ToString();
        }
    }
然后我像这样加载树:

_treeViewAdv.Model = _model;
_treeViewAdv.BeginUpdate();
for (int i = 0; i < 20; i++)
{

    Node parentNode = new ColumnNode("root" + i, "",0);
    _model.Nodes.Add(parentNode);

    for (int n = 0; n < 2; n++)
    {
        Node childNode = new ColumnNode("child" + n,"Further Information",1);
        parentNode.Nodes.Add(childNode); 
    }

}
_treeViewAdv.EndUpdate();
\u treeViewAdv.Model=\u Model;
_treeViewAdv.BeginUpdate();
对于(int i=0;i<20;i++)
{
节点parentNode=新的ColumnNode(“根”+i,”,0);
_model.Nodes.Add(parentNode);
对于(int n=0;n<2;n++)
{
Node childNode=新列节点(“子节点”+n,“进一步信息”,1);
parentNode.Nodes.Add(childNode);
}
}
_treeViewAdv.EndUpdate();
但是有可能创建动态数量的列吗