We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Using CheckBox with TypeScript & KnockoutJS

Thread ID:





128320 Jan 13,2017 02:56 PM UTC Jan 16,2017 11:37 AM UTC JavaScript 1
Tags: ejCheckBox
Gareth Brown
Asked On January 13, 2017 02:56 PM UTC

I seem to be having trouble syncing a ejCheckBox with KnockoutJS to my view model.

    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.

    data-bind="ejCheckBox: {checked: myView().canEdit()}" />

Is this entirely possible? I've looked through JavaScript & TypeScript demo and can't see anything to help.

Prem Kumar Madhan Raj [Syncfusion]
Replied On January 16, 2017 11:37 AM UTC

Hi Garet,   
Thank you for contacting Syncfusion support,   
We have checked your requirement for binding ViewModel data with Checkbox and was unable to reproduce the reported issue.    
We have created a simple sample based on your requirement.    
If this is not the scenario you are trying to achieve, then please let us know with the edited sample to replicate the reported issue, so, that we could find a solution.   
Prem Kumar Madhan Raj.   


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon