We have tried to create a dropdownlist that fills dynamically
tried to create a dropdownlist empty first and then use additem to add items
$('#selectCar').ejDropDownList({
targetID: "carsList",
watermarkText: "Select a car",
width: "100%"
});
var target = $('#selectCar').data("ejDropDownList");
var newitems = [
{ text: "India"},
{ text: "Pakistan"},
];
target.addItem(newitems );
this fails. looks like you cannot create a dropdownlist without items
tried it with adding an empty item first this works but I cant remove the empty items
I need to be able to change the items in the list dynamically
thanks
this