This is a migrated thread and some comments may be shown as answers.

Can't set the text of a menu item

3 Answers 41 Views
Menu
This is a migrated thread and some comments may be shown as answers.
pirobox
Top achievements
Rank 1
pirobox asked on 31 Aug 2010, 12:01 PM
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

3 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 31 Aug 2010, 01:09 PM
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
0
pirobox
Top achievements
Rank 1
answered on 31 Aug 2010, 01:42 PM
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.
0
Yana
Telerik team
answered on 03 Sep 2010, 01:58 PM
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
Tags
Menu
Asked by
pirobox
Top achievements
Rank 1
Answers by
Simon
Telerik team
pirobox
Top achievements
Rank 1
Yana
Telerik team
Share this question
or