This topic illustrates how to add a top-level menu item to a C1Menu control in Design view, in Source view, and in code.
In Design View
Complete the following steps:
In Source View
Add the following markup between the <cc1:C1Menu>
tags:
To write code in Source View
<cc1:C1MenuItem ID="MenuItem1" runat="server" Text="LinkItem1">
</cc1:C1MenuItem>
In Code View
Complete the following steps:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Imports C1.Web.Wijmo.Controls.C1Menu |
To write code in C#
C# |
Copy Code
|
---|---|
using C1.Web.Wijmo.Controls.C1Menu; |
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Dim MenuItem1 As New C1MenuItem() C1MenuItem1.Text = "LinkItem1" C1Menu1.Items.Add(C1MenuItem1) |
To write code in C#
C# |
Copy Code
|
---|---|
C1MenuItem MenuItem1 = new C1MenuItem(); C1MenuItem1.Text = "LinkItem1"; C1Menu1.Items.Add(C1MenuItem1); |