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

handle click event from kendomenu

1 Answer 260 Views
Menu
This is a migrated thread and some comments may be shown as answers.
W
Top achievements
Rank 1
W asked on 26 Feb 2015, 11:39 AM
Hi,
I am trying to create an event to the click of an item from the kendomenu (see bold part in example).
I'm quite new to this and am using a datasource. Is this possible?

window.onload = () => {
$(document).ready(function () {
//Main Ribbonbar Menu
$("#RibbonMenu").kendoMenu(
{
        
dataSource: [
{
text: "Main", imageUrl: "icons/flight.png",
items: [
{
text: "Flights", encoded: false, imageUrl: "icons/flight.png",
items: [
{
text: "Operation Flights", imageUrl: "icons/flight.png", select: function (e) { alert('e');} },
{ text: "Flights", imageUrl: "icons/flight.png" },
{ text: "Timetable Flights", imageUrl: "icons/flight.png" }
]
},
{

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 27 Feb 2015, 02:08 PM
Hello,

The event should be added on control's level and if you want it to be triggered for only some nodes you can check their text and trigger it accordingly as for example it is done in this sample.

Regards,
Plamen
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Menu
Asked by
W
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or