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

Disabling menu item no longer working

1 Answer 162 Views
Menu
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 16 Oct 2019, 08:14 PM

Hi

Just upgraded to 2019.3.917 and we have lost our ability to enable/disable menu items

here is an example of how we populate a menu datasource in javascript:

<script>
   var sa=[], var mm=[];

  sa.push({ text: '<span id=openPlan><span style="display: inline-block; width: 190px;" >Open Plan...</span><span>Ctrl+O</span></span>',  encoded: false });

  sa.push({ text: '<span id=readPlan><span style="display: inline-block; width: 190px;" >Read Plan...</span><span>Ctrl+R</span></span>',  encoded: false });
  sa.push({ text: '<span id=closePlan><span style="display: inline-block; width: 190px;" >Close Plan...</span><span>Ctrl+S</span></span>', encoded: false });

  mm.push({ text: "Main Menu", items: sa });
      $("#mainMenu").kendoMenu({
        dataSource: mm
    });

    // get a reference to the menu widget
    var menu = $("#mainMenu").data("kendoMenu");
    // disable menu item with id 
    menu.enable("#closePlan", false);
</script>

 

I have an example here: https://dojo.telerik.com/EMeLAdAd

If you set then library to '2019.1.115' it works and the 'Close Plan' item gets disabled, but if you set it to '2019.3.917' then it stays enabled!

 

If anyone could let me know what I am doing wrong here I would be grateful.

 

Thanks

James

1 Answer, 1 is accepted

Sort by
0
Petar
Telerik team
answered on 17 Oct 2019, 04:49 PM

Hi James,

I've already answered this question in a private ticket. Let's keep the communication consistent and continue the communication in the other thread.

Regards,
Petar
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Menu
Asked by
James
Top achievements
Rank 1
Answers by
Petar
Telerik team
Share this question
or