public DataTableTreeExample()
        {
            InitializeComponent();
            DataTable table = CreateSampleDataTable();

            this.dataGridView1.Columns.Clear();
            this.dataGridView1.DataSource = table;

            treeViewAdv1.LoadOnDemand = true;
            treeViewAdv1.SelectionMode = TreeSelectionMode.Multi;
            treeViewAdv1.NodeControls.Clear();

            NodeStateIcon ni = new NodeStateIcon();
            ni.DataPropertyName = "Icon";
            treeViewAdv1.NodeControls.Add(ni);

            NodeTextBox tb = new NodeTextBox();
            tb.DataPropertyName = "Text";
            treeViewAdv1.NodeControls.Add(tb);

            
            m_dataTableModel = new DataTableTreeModel(table,"id");
            this.treeViewAdv1.Model = m_dataTableModel;
            this.treeViewAdv1.SelectionChanged += new EventHandler(treeViewAdv1_SelectionChanged);
        }
        public DataTableTreeExample()
        {
            InitializeComponent();
            DataTable table = CreateSampleDataTable();

            this.dataGridView1.Columns.Clear();
            this.dataGridView1.DataSource = table;

            treeViewAdv1.LoadOnDemand  = true;
            treeViewAdv1.SelectionMode = TreeSelectionMode.Multi;
            treeViewAdv1.NodeControls.Clear();

            NodeStateIcon ni = new NodeStateIcon();

            ni.DataPropertyName = "Icon";
            treeViewAdv1.NodeControls.Add(ni);

            NodeTextBox tb = new NodeTextBox();

            tb.DataPropertyName = "Text";
            treeViewAdv1.NodeControls.Add(tb);


            m_dataTableModel                    = new DataTableTreeModel(table, "id");
            this.treeViewAdv1.Model             = m_dataTableModel;
            this.treeViewAdv1.SelectionChanged += new EventHandler(treeViewAdv1_SelectionChanged);
        }