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

Kendo dropdown list cascade event can't be bound to a function

2 Answers 241 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Burgan
Top achievements
Rank 1
Burgan asked on 11 Feb 2013, 06:08 PM
//*******************WORKS*************************
$("#dropdownlist").kendoDropDownList({
    cascade: alert("works")
});
 
 
//*******************DOES NOT WORK**************
$("#dropdownlist").kendoDropDownList({
    cascade: function(){
        alert("Does not work");
    },
});
The cascade event of the kendo dropdown works when there is a single line of code in it,  but when I try to bind a function to the cascade event doesn't trigger, is there a problem in my syntax.

I also made a working demostration of the problem in JSFiddle
http://jsfiddle.net/2Spwh/2/

2 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 12 Feb 2013, 03:17 PM
Hi Doruk,

Actually in the first DropDownList the cascade event handler is not attached correctly. alert("works") is executed when the JavaScript parser passes through this line of code, not when the cascade event is raised.

The second syntax is the correct one, but the problem derives from the Kendo UI version which is used in the current implementation. For your convenience I prepared a JS Bin example.

As a conclusion, please update to the latest Kendo UI version and let me know if this solved the issue.
 

Greetings,
Dimiter Madjarov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Burgan
Top achievements
Rank 1
answered on 13 Feb 2013, 07:49 AM
Hi Dimitrev,

There was a problem with the js versions in my project, updating all to the same version solved it.
Thanks for the quick reply.
Tags
DropDownList
Asked by
Burgan
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Burgan
Top achievements
Rank 1
Share this question
or