I have no issues with assigning a datasource to a listbox:
ie.
…..
.done(function (result) {
var lstSignedUp = document.getElementById('lstSignedUp').ej2_instances[0];
lstSignedUp.dataSource = result;
lstSignedUp.dataBind
})
But how do I un-assign the datasource so the listbox displays no items?
I tried this, but nothing happens,
let lstSignedUp = document.getElementById('lstSignedUp').ej2_instances[0];
lstSignedUp.dataSource = null;
lstSignedUp.dataBind
I've also tried:
lstSignedUp.listData = null //again the list box does not empty.
Thanks,
Mike