Can't set the text of a menu item

4 posts, 0 answers
  1. pirobox
    pirobox avatar
    16 posts
    Member since:
    Nov 2009

    Posted 31 Aug 2010 Link to this post

    Hi,
    for me this is a bug (I'm using version 2010Q2).
    I'm calling client side method set_text of a menu item and I've noticed it works only if the menu item has actually a not null text.

    So in this scenario
    <rad:RadMenuItem Text="Text1" />
    the set_text("NewText") works.

    On the opposite, in this scenario
    <rad:RadMenuItem Text="" />
    the set_text("NewText") doesn't work.

    Best regards, Andrea Pirola
  2. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 31 Aug 2010 Link to this post

    Hello pirobox,

    I was unable to reproduce the issue with the following code:
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <div>
        <telerik:RadMenu ID="RadMenu1" runat="server" OnClientLoad="onLoad">
            <Items>
                <telerik:RadMenuItem Text="">
                    <Items>
                        <telerik:RadMenuItem Text=""></telerik:RadMenuItem>
                    </Items>
                </telerik:RadMenuItem>
            </Items>
        </telerik:RadMenu>
    </div>
    </form>
     
    <script type="text/javascript">
        function onLoad(sender) {
            var root = sender.get_items().getItem(0);
            root.set_text("root");
            root.get_items().getItem(0).set_text("child");
        }
    </script>

    Please let me know if something is missing.

    Best wishes,
    Simon
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. pirobox
    pirobox avatar
    16 posts
    Member since:
    Nov 2009

    Posted 31 Aug 2010 Link to this post

    Your example is giving me the exact issue I was speaking of.

    The version of the assembly I'm using is
    Telerik.Web.UI, Version 2010.2.713.35
    
    If you want I can send you the output html that I'm getting.

    Best regards, Andrea Pirola.
  4. Yana
    Admin
    Yana avatar
    5025 posts

    Posted 03 Sep 2010 Link to this post

    Hi Andrea,

    We were able to reproduce this issue and it will be fixed as soon as possible.  Thank you for reporting it, you can find your points updated.

    Regards,
    Yana
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top