New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

Represents an item in the RadMenu control.

The RadMenu control is made up of items. Items which are immediate children of the menu are root items. Items which are children of root items are child items.

An item usually stores data in two properties, the Text property and the Value property. The value of the Textproperty is displayed in the RadMenu control, and the Value property is used to store additional data.

To create items, use one of the following methods:

  • Use declarative syntax to define items inline in your page or user control.
  • Use one of the constructors to dynamically create new instances of the RadMenuItem class. These items can then be added to the Items collection of another item or menu.
  • Data bind the RadMenu control to a data source.

When the user clicks an item, the RadMenu control can navigate to a linked Web page, post back to the server or select that item. If the NavigateUrl property of an item is set, the RadMenu control navigates to the linked page. By default, a linked page is displayed in the same window or frame. To display the linked content in a different window or frame, use the Target property.

Definition

Namespace:Telerik.Web.UI

Assembly:Telerik.Web.UI.dll

Syntax:

C#
public class RadMenuItem : NavigationItem, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, IMarkableStateManager, IStateManager, INamingContainer, IXmlSerializable, IControlItemContainer, ICloneable, IRadMenuItemContainer

Inheritance: objectControlWebControlControlItemNavigationItemRadMenuItem...

Implements: IAttributeAccessorICloneableIComponentIControlBuilderAccessorIControlDesignerAccessorIControlItemContainerIDataBindingsAccessorIDisposableIExpressionsAccessorIMarkableStateManagerINamingContainerIParserAccessorIRadMenuItemContainerIStateManagerIUrlResolutionServiceIXmlSerializable...

Inherited Members NavigationItem.WriteXml(XmlWriter)NavigationItem.ReadXml(XmlReader)NavigationItem.LoadChildViewState(object)NavigationItem.SaveChildViewState()NavigationItem.TrackChildViewState()NavigationItem.SetChildrenDirty()NavigationItem.AddedControl(Control, int)NavigationItem.ItemTextIsHTMLEncoded()ControlItem.GetHierarchicalIndex()ControlItem.IsChildControl(Control)ControlItem.GetAllChildren<TControlItem>()ControlItem.GetChildren<TControlItem>(Predicate<TControlItem>)ControlItem.FindChild<TControlItem>(Predicate<TControlItem>)ControlItem.IDControlItem.IndexControlItem.AccessKeyControlItem.TemplateControlItem.ContainerControlItem.RenderingCompatibilityControlItem.ChildrenWebControl.ApplyStyle(Style)WebControl.CopyBaseAttributes(WebControl)WebControl.CreateControlStyle()WebControl.LoadViewState(object)WebControl.TrackViewState()WebControl.MergeStyle(Style)WebControl.Render(HtmlTextWriter)WebControl.RenderBeginTag(HtmlTextWriter)WebControl.RenderEndTag(HtmlTextWriter)WebControl.SaveViewState()WebControl.AttributesWebControl.BackColorWebControl.BorderColorWebControl.BorderWidthWebControl.BorderStyleWebControl.ControlStyleWebControl.ControlStyleCreatedWebControl.CssClassWebControl.StyleWebControl.EnabledWebControl.EnableThemingWebControl.FontWebControl.ForeColorWebControl.HasAttributesWebControl.HeightWebControl.IsEnabledWebControl.SupportsDisabledAttributeWebControl.SkinIDWebControl.TabIndexWebControl.TagNameWebControl.ToolTipWebControl.WidthControl.ResolveAdapter()Control.HasEvents()Control.GetRouteUrl(object)Control.GetRouteUrl(string, object)Control.GetRouteUrl(RouteValueDictionary)Control.GetRouteUrl(string, RouteValueDictionary)Control.GetUniqueIDRelativeTo(Control)Control.ApplyStyleSheetSkin(Page)Control.OnDataBinding(EventArgs)Control.DataBind()Control.DataBind(bool)Control.DataBindChildren()Control.AddParsedSubObject(object)Control.EnsureID()Control.OnInit(EventArgs)Control.ClearChildState()Control.ClearChildControlState()Control.ClearChildViewState()Control.ClearEffectiveClientIDMode()Control.ClearCachedClientID()Control.Focus()Control.LoadControlState(object)Control.MapPathSecure(string)Control.OpenFile(string)Control.OnLoad(EventArgs)Control.BuildProfileTree(string, bool)Control.SaveControlState()Control.RenderChildren(HtmlTextWriter)Control.RenderControl(HtmlTextWriter)Control.RenderControl(HtmlTextWriter, ControlAdapter)Control.OnUnload(EventArgs)Control.Dispose()Control.RaiseBubbleEvent(object, EventArgs)Control.OnBubbleEvent(object, EventArgs)Control.CreateControlCollection()Control.ResolveUrl(string)Control.ResolveClientUrl(string)Control.FindControl(string)Control.FindControl(string, int)Control.GetDesignModeState()Control.HasControls()Control.IsLiteralContent()Control.EnsureChildControls()Control.RemovedControl(Control)Control.SetDesignModeState(IDictionary)Control.SetRenderMethodDelegate(RenderMethod)Control.ClientIDModeControl.ClientIDControl.ClientIDSeparatorControl.ContextControl.AdapterControl.DesignModeControl.EventsControl.IsChildControlStateClearedControl.EnableViewStateControl.ViewStateModeControl.IsViewStateEnabledControl.NamingContainerControl.IdSeparatorControl.LoadViewStateByIDControl.PageControl.TemplateControlControl.ParentControl.TemplateSourceDirectoryControl.AppRelativeTemplateSourceDirectoryControl.SiteControl.VisibleControl.UniqueIDControl.HasChildViewStateControl.ControlsControl.ValidateRequestModeControl.ViewStateControl.ViewStateIgnoresCaseControl.ChildControlsCreatedControl.IsTrackingViewStateControl.DisposedControl.DataBindingControl.InitControl.LoadControl.PreRenderControl.Unloadobject.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()object.GetType()object.MemberwiseClone()...

Constructors

Initializes a new instance of the RadMenuItem class.

C#
public RadMenuItem()

Use this constructor to create and initialize a new instance of the RadMenuItem class using default values.

Example:
cs-api-definition
RadMenuItem item = new RadMenuItem();
item.Text = "News";
item.NavigateUrl = "~/News.aspx";

RadMenu1.Items.Add(item);

Initializes a new instance of the RadMenuItem class with the specified text and URL to navigate to.

C#
public RadMenuItem(string text, string navigateUrl)
Parameters:textstring

The text of the item. The Text property is set to the value of this parameter.

navigateUrlstring

The url which the item will navigate to. The NavigateUrl property is set to the value of this parameter.

Use this constructor to create and initialize a new instance of the RadMenuItem class using the specified text and URL.

Example:
cs-api-definition
RadMenuItem item = new RadMenuItem("News", "~/News.aspx");

RadMenu1.Items.Add(item);

Initializes a new instance of the RadMenuItem class with the specified text data.

C#
public RadMenuItem(string text)
Parameters:textstring

The text of the item. The Text property is set to the value of this parameter.

Use this constructor to create and initialize a new instance of the RadMenuItem class using the specified text.

Example:
cs-api-definition
RadMenuItem item = new RadMenuItem("News");

RadMenu1.Items.Add(item);

Properties

Gets or sets the Cascading Style Sheet (CSS) class applied when the menu item is clicked.

C#
public string ClickedCssClass { get; set; }
Property Value:

The CSS class applied when the menu item is clicked. The default value is "clicked".

Example:
C#
By default the visual appearance of clicked menu items is defined in the skin CSS
file. You can use the <strong>ClickedCssClass</strong> property to specify unique
appearance for the menu item when it is clicked.

Gets or sets the path to an image to display for the item when the user clicks the item.

C#
public string ClickedImageUrl { get; set; }
Property Value:

The path to the image to display when the user clicks the item. The default value is empty string.

Use the ClickedImageUrl property to specify the image that will be used when the user clicks the item. If the ClickedImageUrl property is set to empty string the image specified by the ImageUrl property will be used. Use "~" (tilde) when referring to images within the current ASP.NET application.

Example:
C#
<p>&lt;telerik:RadMenu id="RadMenu1" runat="server"&gt;<br />
&lt;Items&gt;<br />
&lt;telerik:RadMenuItem ImageUrl="~/Img/inbox.gif"
<strong>ClickedImageUrl="~/Img/inboxClicked.gif"</strong> Text="Index" /&gt;<br />
&lt;telerik:RadMenuItem ImageUrl="~/Img/outbox.gif"
<strong>ClickedImageUrl="~/Img/outboxClicked.gif"</strong> Text="Outbox"
/&gt;<br />
&lt;/Items&gt;<br />
&lt;/telerik:RadMenu&gt;</p>

Gets or sets the content template.

C#
[Bindable(false)]
[Browsable(false)]
[PersistenceMode(PersistenceMode.InnerProperty)]
[TemplateContainer(typeof(MenuItemContentTemplateContainer))]
[TemplateInstance(TemplateInstance.Single)]
public virtual ITemplate ContentTemplate { get; set; }
Property Value:

The content template.

Get the Content Template container of the RadMenuItem.

C#
[Browsable(false)]
public MenuItemContentTemplateContainer ContentTemplateContainer { get; }

Gets or sets the data item represented by the item.

C#
[Browsable(false)]
public override object DataItem { get; set; }
Property Value:

An object representing the data item to which the Item is bound to. The DataItem property will always return null when accessed outside of ItemDataBound event handler.

Overrides: ControlItem.DataItem

This property is applicable only during data binding. Use it along with the ItemDataBound event to perform additional mapping of fields from the data item to RadMenuItem properties.

Example:
cs-api-definition
private void RadMenu1_MenuItemDataBound(object sender, Telerik.WebControls.ItemStripEventArgs e)
{
RadMenuItem item = e.Item;
DataRowView dataRow = (DataRowView) e.Item.DataItem;

item.ImageUrl = "image" + dataRow["ID"].ToString() + ".gif";
item.NavigateUrl = dataRow["URL"].ToString();
}

Gets or sets the Cascading Style Sheet (CSS) class applied when the menu item is disabled.

C#
public string DisabledCssClass { get; set; }
Property Value:

The CSS class applied when the menu item is disabled. The default value is "disabled".

By default the visual appearance of disabled menu items is defined in the skin CSS file. You can use the DisabledCssClass property to specify unique appearance for the menu item when it is disabled.

Gets or sets the path to an image to display when the items is disabled.

C#
public string DisabledImageUrl { get; set; }
Property Value:

The path to the image to display when the item is disabled. The default value is empty string.

Use the DisabledImageUrl property to specify the image that will be used when the item is disabled. If the DisabledImageUrl property is set to empty string the image specified by the ImageUrl property will be used. Use "~" (tilde) when referring to images within the current ASP.NET application.

Example:
C#
<p>&lt;telerik:RadMenu id="RadMenu1" runat="server"&gt;<br />
&lt;Items&gt;<br />
&lt;telerik:RadMenuItem ImageUrl="~/Img/inbox.gif"
<strong>DisabledImageUrl="~/Img/inboxDisabled.gif"</strong> Text="Index"
/&gt;<br />
&lt;telerik:RadMenuItem ImageUrl="~/Img/outbox.gif"
<strong>DisabledImageUrl="~/Img/outboxDisabled.gif"</strong> Text="Outbox"
/&gt;<br />
&lt;/Items&gt;<br />
&lt;/telerik:RadMenu&gt;</p>

Gets or sets a value indicating whether the item image should have sprite support.

C#
[ClientControlProperty]
[ClientPropertyName("enableImageSprite")]
public bool EnableImageSprite { get; set; }
Property Value:

True if the item should have sprite support; otherwise False. The default value is False.

Gets or sets the Cascading Style Sheet (CSS) class applied when the menu item is opened (its child items are visible).

C#
public string ExpandedCssClass { get; set; }
Property Value:

The CSS class applied when the menu item is opened. The default value is "expanded".

By default the visual appearance of opened menu items is defined in the skin CSS file. You can use the ExpandedCssClass property to specify unique appearance for the menu item when it is opened.

Gets or sets the path to an image to display when the items is expanded.

C#
public string ExpandedImageUrl { get; set; }
Property Value:

The path to the image to display when the item is expanded. The default value is empty string.

Use the ExpandedImageUrl property to specify the image that will be used when the item is expanded. If the ExpandedImageUrl property is set to empty string the image specified by the ImageUrl property will be used. Use "~" (tilde) when referring to images within the current ASP.NET application.

Example:
C#
<p>&lt;telerik:RadMenu id="RadMenu1" runat="server"&gt;<br />
&lt;Items&gt;<br />
&lt;telerik:RadMenuItem ImageUrl="~/Img/inbox.gif"
<strong>ExpandedImageUrl="~/Img/inboxExpanded.gif"</strong> Text="Index"
/&gt;<br />
&lt;telerik:RadMenuItem ImageUrl="~/Img/outbox.gif"
<strong>ExpandedImageUrl="~/Img/outboxExpanded.gif"</strong> Text="Outbox"
/&gt;<br />
&lt;/Items&gt;<br />
&lt;/telerik:RadMenu&gt;</p>

Gets or sets the expand behavior of the menu item.

When set to ExpandMode.WebService the RadMenuItem will populate its children from the web service specified by the RadMenu.WebService and RadMenu.WebServiceMethod properties.

C#
public MenuItemExpandMode ExpandMode { get; set; }
Property Value:

On of the MenuItemExpandMode values. The default value is ClientSide.

Gets or sets the Cascading Style Sheet (CSS) class applied when the menu item is focused.

C#
public string FocusedCssClass { get; set; }
Property Value:

The CSS class applied when the menu item is focused. The default value is "focused".

By default the visual appearance of focused menu items is defined in the skin CSS file. You can use the FocusedCssClass property to specify unique appearance for the menu item when it is focused.

Specifies the settings for child item behavior.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public RadMenuItemGroupSettings GroupSettings { get; }
Property Value:

An instance of the RadMenuItemGroupSettings class.

You can customize the following settings

  • item flow
  • expand direction
  • horizontal offset from the parent item
  • vertical offset from the parent item
  • width
  • height

For more information check RadMenuItemGroupSettings.

C#
protected virtual bool HasContentTemplate { get; }

Gets or sets the path to an image to display for the item when the user moves the mouse over the item.

C#
public override string HoveredImageUrl { get; set; }
Property Value:

The path to the image to display when the user moves the mouse over the item. The default value is empty string.

Overrides: NavigationItem.HoveredImageUrl

Use the HoveredImageUrl property to specify the image that will be used when the user moves the mouse over the item. If the HoveredImageUrl property is set to empty string the image specified by the ImageUrl property will be used. Use "~" (tilde) when referring to images within the current ASP.NET application.

Example:
C#
<p>&lt;telerik:RadMenu id="RadMenu1" runat="server"&gt;<br />
&lt;Items&gt;<br />
&lt;telerik:RadMenuItem ImageUrl="~/Img/inbox.gif"
<strong>HoveredImageUrl="~/Img/inboxOver.gif"</strong> Text="Index" /&gt;<br />
&lt;telerik:RadMenuItem ImageUrl="~/Img/outbox.gif"
<strong>HoveredImageUrl="~/Img/outboxOver.gif"</strong> Text="Outbox" /&gt;<br />
&lt;/Items&gt;<br />
&lt;/telerik:RadMenu&gt;</p>

Gets or sets the path to an image to display for the item.

C#
public override string ImageUrl { get; set; }
Property Value:

The path to the image to display for the item. The default value is empty string.

Overrides: NavigationItem.ImageUrl

Use the ImageUrl property to specify the image for the item. If the ImageUrl property is set to empty string no image will be rendered. Use "~" (tilde) when referring to images within the current ASP.NET application.

Example:
C#
<p>The following example demonstrates how to specify the image to display for
the item using the <strong>ImageUrl</strong> property.</p>
<p>
    <p>&lt;telerik:RadMenu id="RadMenu1"
    runat="server"&gt;<br />
    &lt;Items&gt;<br />
    &lt;telerik:RadMenuItem <strong>ImageUrl="~/Img/inbox.gif"</strong> Text="Index"
    /&gt;<br />
    &lt;telerik:RadMenuItem <strong>ImageUrl="~/Img/outbox.gif"</strong> Text="Outbox"
    /&gt;<br />
    &lt;/Items&gt;<br />
    &lt;/telerik:RadMenu&gt;</p>
</p>

Sets or gets whether the item is separator. It also represents a logical state of the item. Might be used in some applications for keyboard navigation to omit processing items that are marked as separators.

C#
public bool IsSeparator { get; set; }

Gets a RadMenuItemCollection object that contains the child items of the current RadMenuItem.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
[Browsable(false)]
public RadMenuItemCollection Items { get; }
Property Value:

A RadMenuItemCollection that contains the child items of the current RadMenuItem. By default the collection is empty (the item has no children).

Implements: IRadMenuItemContainer.Items

Use the Items property to access the child items of the RadMenuItem. You can also use the Items property to manage the child items - you can add, remove or modify items.

Example:
cs-api-definition
RadMenuItem item = RadMenu1.FindItemByText("Test");
item.Items[0].Text = "Example";
item.Items[0].NavigateUrl = "http://www.example.com";

Gets or sets the template for displaying the item.

C#
[TemplateContainer(typeof(RadMenuItem))]
[PersistenceMode(PersistenceMode.InnerProperty)]
[Browsable(false)]
[Bindable(false)]
public ITemplate ItemTemplate { get; set; }
Property Value:

A ITemplate implemented object that contains the template for displaying the item. The default value is a null reference (Nothing in Visual Basic), which indicates that this property is not set.

To specify common display for all menu items use the ItemTemplate property of the RadMenu class.

Example:
C#
<p>The following template demonstrates how to add a Calendar control in certain
menu item.</p>
<p>ASPX:</p>
<p>&lt;telerik:RadMenu runat="server" ID="RadMenu1"&gt;</p>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
    <p>&lt;Items&gt;</p>
    <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
        <p>&lt;telerik:RadMenuItem Text="Date"&gt;</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
            <p>&lt;Items&gt;</p>
            <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
                <p>&lt;telerik:RadMenuItem Text="SelectDate"&gt;</p>
                <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
                    <p>&lt;ItemTemplate&gt;</p>
                    <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
                        <p>&lt;asp:Calendar runat="server" ID="Calendar1"
                        /&gt;</p>
                    </blockquote>
                    <p>&lt;/ItemTemplate&gt;</p>
                </blockquote>
                <p>&lt;/telerik:RadMenuItem&gt;</p>
            </blockquote>
            <p>&lt;/Items&gt;</p>
        </blockquote>
        <p>&lt;/telerik:RadMenuItem&gt;</p>
    </blockquote>
    <p>&lt;/Items&gt;</p>
</blockquote>
<p>&lt;/telerik:RadMenu&gt;</p>

Manages the item level of a particular Item instance. This property allows easy implementation/separation of the menu items in levels.

C#
[Browsable(false)]
public int Level { get; }

Gets the RadMenu instance which contains the item.

C#
[Browsable(false)]
public RadMenu Menu { get; }

Use this property to obtain an instance to the RadMenu object containing the item.

Gets or sets the URL to link to when the item is clicked.

C#
[Bindable(true)]
public override string NavigateUrl { get; set; }
Property Value:

The URL to link to when the item is clicked. The default value is empty string.

Overrides: NavigationItem.NavigateUrl

Use the NavigateUrl property to specify the URL to link to when the item is clicked. Use "~" (tilde) in front of an URL within the same ASP.NET application. When specifying external URL do not forget the protocol (e.g. "http://").

Example:
C#
The following example demonstrates how to use the <strong>NavigateUrl</strong>
property

<p>
    <p>&lt;telerik:RadMenu id="RadMenu1"
    runat="server"&gt;<br />
    &lt;Items&gt;<br />
    &lt;telerik:RadMenuItem Text="News" <strong>NavigateUrl="~/News.aspx"</strong>
    /&gt;<br />
    &lt;telerik:RadMenuItem Text="External URL"
    <strong>NavigateUrl="http://www.example.com"</strong> /&gt;<br />
    &lt;/Items&gt;<br />
    &lt;/telerik:RadMenu&gt;</p>
</p>

Gets or sets the Cascading Style Sheet (CSS) class applied on the outmost item element (<LI>).

C#
public string OuterCssClass { get; set; }
Property Value:

The CSS class applied on the wrapping element (<LI>). The default value is empty string.

You can use the OuterCssClass property to specify unique appearance for the item.

Gets the IRadMenuItemContainer object which contains the current menu item.

C#
[Browsable(false)]
public IRadMenuItemContainer Owner { get; }
Property Value:

The object which contains the menu item. It might be an instance of the RadMenu class or the RadMenuItem class depending on the hierarchy level.

Implements: IRadMenuItemContainer.Owner

The value is of the IRadMenuItemContainer type which is implemented by the RadMenu and the RadMenuItem classes. Use the Owner property when recursively traversing items in the RadMenu control.

Gets or sets a value indicating whether clicking on the item will postback.

C#
public bool PostBack { get; set; }
Property Value:

True if the menu item should postback; otherwise false. By default all the items will postback provided the user has subscribed to the ItemClick event.

If you subscribe to the ItemClick all menu items will postback. To turn off that behavior you should set the PostBack property to false. This property cannot be set in design time.

C#
protected override IDictionary<string, string> PropertyMappings { get; }

Overrides: ControlItem.PropertyMappings

C#
protected virtual IRenderer Renderer { get; }

Gets or sets a value indicating whether the item is selected.

C#
public bool Selected { get; set; }
Property Value:

True if the item is selected; otherwise false. The default value is false.

Only one item can be selected.

Gets or sets the Cascading Style Sheet (CSS) class applied when the item is selected.

C#
public string SelectedCssClass { get; set; }

By default the visual appearance of selected items is defined in the skin CSS file. You can use the SelectedCssClass property to specify unique appearance for a item when it is selected.

Gets or sets a value specifying the URL of the image rendered when the item is selected.

C#
public string SelectedImageUrl { get; set; }

If the SelectedImageUrl property is not set the ImageUrl property will be used when the node is selected.

Gets or sets the Cascading Style Sheet (CSS) class that contains the sprite image for this Item and the positioning for it.

C#
public string SpriteCssClass { get; set; }
Property Value:

The CSS that is used in sprite image scenarios. String.Empty.

By default, the image in an Item is defined by the ImageUrl property. You can use SpriteCssClass to specify a class that will position a sprite instead of using image. The CssClasss is applied when EnableImageSprite property is set to true.

C#
protected override HtmlTextWriterTag TagKey { get; }

Overrides: WebControl.TagKey

Gets or sets the target window or frame to display the Web page content linked to when the menu item is clicked.

C#
[TypeConverter(typeof(TargetConverter))]
public override string Target { get; set; }
Property Value:

The target window or frame to load the Web page linked to when the Item is selected. Values must begin with a letter in the range of a through z (case insensitive), except for the following special values, which begin with an underscore:

The default value is empty string.

Overrides: NavigationItem.Target

Use the Target property to specify the frame or window that displays the Web page linked to when the menu item is clicked. The Web page is specified by setting the NavigateUrl property.

If this property is not set, the Web page specified by the NavigateUrl property is loaded in the current window.

Example:
C#
<p>The following example demonstrates how to use the <strong>Target</strong>
property</p>
<p>ASPX:</p>
<p>&lt;telerik:RadMenu runat="server" ID="RadMenu1"&gt;</p>
<p>&lt;Items&gt;</p>
<p>&lt;telerik:RadMenuItem <strong>Target="_blank"</strong>
NavigateUrl="http://www.google.com" /&gt;</p>
<p>&lt;/Items&gt;</p>
<p>&lt;/telerik:RadMenu&gt;</p>

Gets or sets the text caption for the menu item.

C#
public override string Text { get; set; }
Property Value:

The text of the item. The default value is empty string.

Overrides: ControlItem.Text

Use the Text property to specify the text to display for the item.

Example:
C#
This example demonstrates how to set the text of the item using the
<strong>Text</strong> property.

<p>
    <p>&lt;telerik:RadMenu ID="RadMenu1"
    runat="server"&gt;<br />
    &lt;Items&gt;<br />
    &lt;telerik:RadMenuItem <strong>Text="News"</strong> /&gt;<br />
    &lt;telerik:RadMenuItem <strong>Text="News"</strong> /&gt;<br />
    &lt;/Items&gt;<br />
    &lt;/telerik:RadMenu&gt;</p>
</p>

Gets or sets the value associated with the menu item.

C#
public override string Value { get; set; }
Property Value:

The value associated with the item. The default value is empty string.

Overrides: ControlItem.Value

Use the Value property to specify or determine the value associated with the item.

Methods

C#
protected override void AddAttributesToRender(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

Overrides: WebControl.AddAttributesToRender(HtmlTextWriter)

Instantiates the ContentTemplate inside the Content. Clears all existing controls in the Content before that.

C#
public void ApplyContentTemplate()

Creates a copy of the current RadMenuItem object.

C#
public RadMenuItem Clone()
Returns:

RadMenuItem

A RadMenuItem which is a copy of the current one.

Use the Clone method to create a copy of the current item. All properties of the clone are set to the same values as the current ones. Child items are not cloned.

C#
protected override void CreateChildControls()

Overrides: Control.CreateChildControls()

C#
protected override ControlItemCollection CreateChildItemCollection()
Returns:

ControlItemCollection

Overrides: ControlItem.CreateChildItemCollection()

C#
protected virtual IRenderer CreateItemRenderer()
Returns:

IRenderer

Highlights the path from the item to the top of the menu.

C#
public void HighlightPath()

The HighlightPath method applies the "rmFocused" CSS class to the item and his ancestor items. As a results the "path" from the top level to that specific item is highlighted.

C#
protected override void LoadFromDictionary(IDictionary<string, object> dictionary)
Parameters:dictionaryIDictionary<string, object>

Overrides: NavigationItem.LoadFromDictionary(IDictionary<string, object>)

C#
protected override void OnPreRender(EventArgs e)
Parameters:eEventArgs

Overrides: Control.OnPreRender(EventArgs)

C#
protected override void ReadXmlForChildren(XmlReader reader)
Parameters:readerXmlReader

Overrides: NavigationItem.ReadXmlForChildren(XmlReader)

Removes the item from its container

C#
public void Remove()
C#
protected override void RenderContents(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

Overrides: WebControl.RenderContents(HtmlTextWriter)

C#
protected override void SetItemContainer(ControlItemContainer itemContainer)
Parameters:itemContainerControlItemContainer

Overrides: NavigationItem.SetItemContainer(ControlItemContainer)

C#
protected override void WriteXmlForChildren(XmlWriter writer)
Parameters:writerXmlWriter

Overrides: NavigationItem.WriteXmlForChildren(XmlWriter)