I have a list box which is using the options knockout data binding. The observable array which is bound to the list box is empty when the page loads but it gets filled on click of a button. How can I dynamically refresh the options binding of the list box on button click ?
<select id="listBoxOne" size="10" multiple="multiple" data-bind="options: icdCodesForDxCodeSorterListBox">
</select>
The listbox is inside a modal form and the observable array gets filled on click of a button which is not in modal form.
icdCodesForDxCodeSorterListBoxis an observable array then your options binding should update automatically. Please post your code where you fill theicdCodesForDxCodeSorterListBox! - nemesvvm.icdCodesForDxCodeSorterListBox.pushwithout the()otherwise you are pushing into the underlying array and Knockout won't be notified about the changes... - nemesv