Accessing ContentTemplate from code

2 posts, 0 answers
  1. Fit2Page
    Fit2Page avatar
    407 posts
    Member since:
    Feb 2007

    Posted 30 Mar 2015 Link to this post

    This works for ItemTemplate:

    But how can I access the ContentTemplate for a menu item from code?

  2. Ivan Danchev
    Ivan Danchev avatar
    1617 posts

    Posted 01 Apr 2015 Link to this post


    The controls placed in a RadMenuItem ContentTemplate can be accessed by their ID, as shown below:
    <telerik:RadMenu ID="RadMenu1" runat="server" Width="450">
             <telerik:RadMenuItem Text="Root1">
                    <telerik:RadButton runat="server" ID="Button1"></telerik:RadButton>

    protected void Page_Load(object sender, EventArgs e)
        Button1.Text = "NewText";

    Ivan Danchev

    See What's Next in App Development. Register for TelerikNEXT.

Back to Top