igcombo
works fine when using a static div element, however if I added the div element dynamically to the page the igcombo
box data won't be populated. Is there any thing I can try to make this work?
$("#combo").igCombo({
dataSource: data, //JSON Array
valueKey: "ID",
textKey: "Name"
});
<div id="combo"></div>
The
igCombo
and any other widget needs to be initialized on an element that already exists in the DOM. In order to have it work with a container that you create dynamically, you simply need to call the initialization code after the element is added to the DOM.