I seem to be having trouble syncing a ejCheckBox with KnockoutJS to my view model.
<input
type="checkbox"
id="canEditCheckBox"
data-bind="checked: myView().canEdit()" />
The following code by itself works fine. However when I create a ej.CheckBox in code it no longer binds to the check data
this.canEditCheckBox = new ej.CheckBox($("#canEditCheckBox"), {
size: "medium",
enableTriState: false,
enabled: true
});
I've also tried to bind set the check value within the ej.CheckBox but it does not work either, i.e. is not updated.
Also I've changed the HTML binding but again it doesn't work.
<input
type="checkbox"
id="canEditCheckBox"
data-bind="ejCheckBox: {checked: myView().canEdit()}" />
Is this entirely possible? I've looked through JavaScript & TypeScript demo and can't see anything to help.