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

Change kendoDropDownList remote dataSource

0 Answers 21 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Erik
Top achievements
Rank 1
Erik asked on 11 Nov 2014, 07:03 AM
hi all,

as per title, how to make this possible?

var newDataSource=new kendo.data.DataSource({
                    transport : {
                      read : {
                        url : context+"/master/common/listLocationByCountry/"+data.country.id+"?marketDifferentialId="+data.id+"&locationId="+data.location.id
                      }
                    }
              });
              newDataSource.read();
              var locationName = data.location.name;
              var locationValue=data.location.id;
              var locationDropDown = $("#locationId").data("kendoDropDownList");         
              locationDropDown.setOptions({ dataTextField: "name", dataValueField: "id" });
              locationDropDown.setDataSource(newDataSource);
              $("#locationId").val(locationValue).data("kendoDropDownList").text(locationName);


the problem is the dropdown is still access url from old datasource to pupolate.

thanks

No answers yet. Maybe you can help?

Tags
DropDownList
Asked by
Erik
Top achievements
Rank 1
Share this question
or