Skip to content Skip to sidebar Skip to footer

Kendo UI Listbox Displaying Duplicate Items

I'm using a Kendo UI Listbox control to display items. I'm populating the control by specifying a javascript array as the data source. Here is the page markup.

Solution 1:

You seem to be re-creating the widget over an already existent instance, that is why it is duplicating the items. Check this out.

If you want to update the list of an already created widget instance, try either:

  1. Change the DataSource's data:

    $("#selectedview").data("kendoListBox").dataSource.data(subscribers);
    
  2. To set setDataSource again:

    $("#selectedview").data("kendoListBox").setDataSource(new kendo.data.DataSource({ 
        data: subscribers
    });
    

Post a Comment for "Kendo UI Listbox Displaying Duplicate Items"