RadMenu for ASP.NET

The obsolete MenuGroup class Send comments on this topic.
See Also
Already using the control > Changes and backward compatibility > The obsolete MenuGroup class

Glossary Item Box

The MenuGroup class has been removed for consistency with all  Telerik navigational controls (treeview, tabstrip, combobox, etc.) and for API simplicity. Menu items now directly expose the Items collection, which may hold any number of child items.

Example

The ASPX code below shows a menu with two root items. The first root item has a child group consisting of three menu items:

  Copy Code
<rad:RadMenu ID="RadMenu1" runat="server">
   
<Items>
       
<rad:MenuItem runat="server" Text="Root MenuItem 1">
           
<Items>
               
<rad:MenuItem runat="server”Text="Child MenuItem 1.1" />
               
<rad:MenuItem runat="server" Text="Child MenuItem 1.2" />
               
<rad:MenuItem runat="server" Text="Child MenuItem 1.3" />
           
</Items>
       
</rad:MenuItem>
       
<rad:MenuItem runat="server" Text="Root MenuItem 2" / >
   
</Items>
</
rad:RadMenu>
Even though the MenuGroup class is gone, child items do form a group of related items that share common settings. These settings can be set in the GroupSettings class, exposed as a property of each MenuItem. (Pic. 1)

Pic. 1
The GroupSettings collection

 

Group settings defined using the Visual Studio design time are serialized declaratively as child tags of the respective parent MenuItem. Group settings apply to all children of the parent item.

Example

  Copy Code
<rad:RadMenu ID="RadMenu1" runat="server">
   
<Items>
       
<rad:MenuItem runat="server" Text="Root MenuItem 1">
<GroupSettings Flow="Horizontal" Height="100px" OffsetX="200" OffsetY="100" />
           
<Items>
               
<rad:MenuItem runat="server”Text="Child MenuItem 1.1" />
               
<rad:MenuItem runat="server" Text="Child MenuItem 1.2" />
               
<rad:MenuItem runat="server" Text="Child MenuItem 1.3" />
           
</Items>
       
</rad:MenuItem>
       
<rad:MenuItem runat="server" Text="Root MenuItem 2" / >
   
</Items>
</
rad:RadMenu>

See Also