This topic illustrates how to add a top-level node to a C1TreeView control in Design view, in Source view, and in code.
In Design View
Complete the following steps:
The C1TreeView Designer Form dialog box opens.
In Source View
Add the following markup between the <cc1:C1TreeView>
tags:
Markup |
Copy Code
|
---|---|
<cc1:C1TreeViewNode ID="Node1" runat="server" Text="Node1"> </cc1:C1TreeViewNode> |
In Code View
Complete the following steps:
To write the code in Visual Basic:
Visual Basic |
Copy Code
|
---|---|
Imports C1.Web.Wijmo.Controls.C1TreeView |
To write the code in C#:
C# |
Copy Code
|
---|---|
using C1.Web.Wijmo.Controls.C1TreeView; |
To write the code in Visual Basic:
Visual Basic |
Copy Code
|
---|---|
Dim TreeViewNode1 As New C1TreeViewNode() C1TreeViewNode1.Text = "C1TreeViewNode1" C1TreeView1.Nodes.Add(C1TreeViewNode1) |
To write the code in C#:
C# |
Copy Code
|
---|---|
C1TreeViewNode TreeViewNode1 = new C1TreeViewNode(); C1TreeViewNode1.Text = "C1TreeViewNode1"; C1TreeView1.Nodes.Add(C1TreeViewNode1); |