There is an issue with Value method when remove an option

2 posts, 0 answers
  1. Tomas
    Tomas avatar
    11 posts
    Member since:
    Apr 2013

    Posted 23 Apr 2018 Link to this post

    Hi, I have the next code 


    <input id="dropdownlist" />



        dataTextField: "text",
        dataValueField: "value",
        dataSource: [
            {text:"None",       value:"Fruits"},
            {text:"Apples",     value:"Apples"},
            {text:"Oranges",    value:"Oranges"},
            {text:"Lechus",     value:"Lechus"},
            {text:"Carrot",     value:"Carrot"}
    var dropdownlist = $("#dropdownlist").data("kendoDropDownList");
    removeItem(dropdownlist, "Oranges");
    function removeItem(dropdownlist, value){
        var items =;
        var foundItem = {};
        var i;
        for (i = 0; i < items.length; i++) {
            if (items[i].value == value) {
                foundItem = items[i];
        if (foundItem) {


    If you run, the dropdown list has a issue, two options are selected.

    If you comment code line removeItem(dropdownlist, "Oranges"); works well, I think that Remove method of dataSource is the problem.

    I tested in DOJO with all versions but the problem is no solved.

    Could are you tell me why does that occur ?  and How could I solved this problem?


  2. Neli
    Neli avatar
    221 posts

    Posted 24 Apr 2018 Link to this post

    Hello Tomas,

    After an item is removed you could refresh the DropDownList. Thus, the data will be rebound and the correct value will be selected. 

    Another option is instead of refresh() method, to trigger the 'change' event.

    Here is a Dojo example where refresh method is called and the DropDownList is populated correctly.

    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top