Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kendo DropDownList Change event

I have a Kendo DropDownList with the id SapProject_Id, when user changes its value I need to fire onChange, but this needs to be done in jquery not when I define Kendo DropDownList.

I have tried following code which is not working:

var sapProject = $("#SapProject_Id").data("kendoDropDownList");
sapProject.change = onChange;

function onChange() {
    alert(1);
}
like image 436
Varun Avatar asked May 18 '15 20:05

Varun


1 Answers

The correct way of doing this is:

var sapProject = $("#SapProject_Id").data("kendoDropDownList").bind("change", onChange);
like image 176
Varun Avatar answered Sep 28 '22 02:09

Varun