Change kendoDropDownList remote dataSource

1 posts, 0 answers
  1. Erik
    Erik avatar
    1 posts
    Member since:
    Nov 2014

    Posted 11 Nov 2014 Link to this post

    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
Back to Top