ItemTemplate and ClickToOpen

4 posts, 0 answers
  1. Caesar
    Caesar avatar
    59 posts
    Member since:
    Aug 2008

    Posted 15 Sep 2009 Link to this post

    Hello!

    We want to use ClickToOpen on the root level of a menu.
    At the same time we are using an ItemTemplate for the root level.

    This combination doesn't work at all. Nothing happens when clicking the menu-item.
    When looking at the source code it is obvious that it doesn't work since no a-tag is generated if it is templated.

    Will this be fixed? And is there a workaround to get this to work until it is fixed?

    Regards
    Rikard
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 15 Sep 2009 Link to this post

    Hi Caesar,

    You can try the following as a workaround:

            <telerik:RadMenu runat="server" ClickToOpen="true">
                <Items>
                    <telerik:RadMenuItem>
                        <ItemTemplate>
                            <a class="rmLink"><span class="rmText">This is the root item</span></a>
                        </ItemTemplate>
                        <Items>
                            <telerik:RadMenuItem Text="Item 1"></telerik:RadMenuItem>
                            <telerik:RadMenuItem Text="Item 2"></telerik:RadMenuItem>
                            <telerik:RadMenuItem Text="Item 3"></telerik:RadMenuItem>
                            <telerik:RadMenuItem Text="Item 4"></telerik:RadMenuItem>
                            <telerik:RadMenuItem Text="Item 5"></telerik:RadMenuItem>
                        </Items>
                    </telerik:RadMenuItem>
                </Items>
            </telerik:RadMenu>

    Regards,
    Albert,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Tan PS
    Tan PS avatar
    5 posts
    Member since:
    Aug 2009

    Posted 22 Feb 2012 Link to this post

    Dear Atanas,

    From your solution provided above to enable ClickToOpen works in RadMenu with ItemTemplate. Then how can we apply the same to RadMenu with ItemTemplate created from code-behind? See sample from this link - checkbox within RadMenu?

    Can you please provide a solution for RadMenu with ItemTemplate created from Code-Behind?

    Thanks in advanced,
    PS

  5. Tan PS
    Tan PS avatar
    5 posts
    Member since:
    Aug 2009

    Posted 22 Feb 2012 Link to this post

    Dear all, I found a solution, just add HyperLink & span control at the root node from Code-Behind solved the issue.

    Cheers,
    PS
Back to Top