Edit this page

Populating with Data

This article demonstrates how to populate RadApplicationMenu with data either at design time or at run time.

Adding Items at Design Time

You can add items at design time by using the RadItem Collection Editor.

Figure 1: RadApplicationMenu's RadItem Collection Editor

menus-application-menu-populating-with-data-design-time 001

You can access it through the Smart tag >> Edit Items option:

Figure 2: Smart tag options

menus-application-menu-populating-with-data-design-time 002

By using the Edit RightColumnItems and Edit ButtonItems options you can add items to the menu's right column and bottom buttons container respectively.

Another possibility to open the editor is via the Items collection in the Properties Visual Studio section:

Figure 3: Visual Studio Properties window

menus-application-menu-populating-with-data-design-time 003print

Adding Items Programmatically

RadApplicationMenu supports adding items at run time, which means that you can manually populate it with items. The following example demonstrates how to add items to the left and right drop down menu's columns and to the bottom buttons container.

Add items programmatically

public ApplicationMenu()

    RadMenuItem newItem = new RadMenuItem("New");
    newItem.Click += NewItem_Click;

    RadMenuItem saveItem = new RadMenuItem("Save");
    saveItem.Click += SaveItem_Click;

    RadMenuItem printItem = new RadMenuItem("Print");
    printItem.Click += PrintItem_Click;

    RadMenuButtonItem exitItem = new RadMenuButtonItem("Exit");
    exitItem.Click += ExitItem_Click;

private void ExitItem_Click(object sender, EventArgs e)

private void PrintItem_Click(object sender, EventArgs e)
    RadMessageBox.Show("Print item is clicked!");

private void SaveItem_Click(object sender, EventArgs e)
    RadMessageBox.Show("Save item is clicked!");

private void NewItem_Click(object sender, EventArgs e)
    RadMessageBox.Show( "New item is clicked!");

Public Sub New()

    Dim newItem As New RadMenuItem("New")
    AddHandler newItem.Click, AddressOf NewItem_Click

    Dim saveItem As New RadMenuItem("Save")
    AddHandler saveItem.Click, AddressOf SaveItem_Click

    Dim printItem As New RadMenuItem("Print")
    AddHandler printItem.Click, AddressOf PrintItem_Click

    Dim exitItem As New RadMenuButtonItem("Exit")
    AddHandler exitItem.Click, AddressOf ExitItem_Click
End Sub

Private Sub ExitItem_Click(sender As Object, e As EventArgs)
End Sub

Private Sub PrintItem_Click(sender As Object, e As EventArgs)
    RadMessageBox.Show("Print item is clicked!")
End Sub

Private Sub SaveItem_Click(sender As Object, e As EventArgs)
    RadMessageBox.Show("Save item is clicked!")
End Sub

Private Sub NewItem_Click(sender As Object, e As EventArgs)
    RadMessageBox.Show("New item is clicked!")
End Sub

Figure 4: Add items programmatically

menus-application-menu-populating-with-data-design-time 004