jQuery UI Widgets Forums Editors CheckBox, RadioButton jqxCheckBox with Knockout

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 10 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • jqxCheckBox with Knockout #46050



    I’m having trouble getting jqxCheckBox to recognize updates to the ViewModel. I’ve got <input type=”checkbox”/> to work fine, but not when I replace it with the correct HTML using jqxCheckBox. Here are the two samples:

    valInput = ‘<td><input id=”‘+dataRow.id+'” type=”checkbox” data-bind=”checked: ‘+dataRow.bind+'” /></td>’;
    The above works fine.

    valInput = ‘<td><div id=”‘+dataRow.id+'” data-bind=”jqxCheckBox: {checked: ‘+dataRow.bind+’}”></div></td>’;
    This version does not.

    A little background – I build all my HTML dynamically prior to calling ko.mapping.fromJS( data ) followed by ko.applyBindings( data );

    The KO binding recognizes the observer because the box gets checked or unchecked properly based on the input. The problem is the my data does not get updated on subsequent updates.

    If it helps the contents of dataRow.id is: ‘thermal-properties-radiation-rnV2’ and dataRow.bind is: ‘thermal.properties.radiation’.

    Any help would be greatly appreciated. I would prefer to use the jqxCheckBox widget to keep all my styling consistent.


    jqxCheckBox with Knockout #46076

    Peter Stoev

    Hi drperk,

    I would suggest you to look at the demo about jqxCheckBox with KO and how to implement the bindings – http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxknockout/checkbox.htm?arctic. In addition, check whether jqxknockout.js is included, too.

    Best Regards,
    Peter Stoev

    jQWidgets Team

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.