Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kendo Refresh (DropDownList.refresh()) not working ERROR Not define

Im trying to refresh the Drop Down List after another DropDownList is Change But the Refresh() method is Undefined Error Is Promoting.There For I Tried the Read the DataSource again and it shows it loading but the data is still the same.Help to Solve this Issue please.

Code:

$("#DropDownList1").change(function () {
   custCode = $("#DropDownList1").val();

   $("#titles").data("kendoDropDownList").dataSource.read(); //shows list Loading But Same Data Is present .
   $("#titles").data("kendoDropDownList").refresh(); //NOT Working 

});
like image 913
cwishva Avatar asked Aug 26 '12 18:08

cwishva


People also ask

How do I refresh kendo dropdown?

on your read url add '? myDate=' + new Date(). This will refresh the data.

What is Kendo DropDownList?

The Kendo UI for Angular DropDownList is a form component that lets you choose a single predefined value from a list. It is a richer version of the <select> element and supports data binding, filtering, templates, and default items.


2 Answers

1- Try adding cache: false to disable the cache in Kendo DropDownList's datasource read property:

read: {
    url: <<"url">>,
    cache: false
}

2- Then call read(),

$("#ddl").data("kendoDropDownList").dataSource.read();

It worked for me :)

like image 110
Abhishek Avatar answered Sep 17 '22 20:09

Abhishek


For me just this line did the job:

$("#myDropDownList").data("kendoDropDownList").dataSource.read();

like image 42
user1291282 Avatar answered Sep 16 '22 20:09

user1291282