jQuery UI Widgets Forums Editors CheckBox, RadioButton Issue with KnockoutJS & jqxCheckbox and jqxradioButtons

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

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

  • achebrolu

    Hi All,
    I am trying to make use of the knockout plugins available for the jqxCheckbox &jqxradio buttons.but I see that jqWidgets support only checked property.
    My requirement is like I have 5 checkboxes(with values 1 to 5) in my form and from our database I get an array like “[3,4]” so I need to check checkboxes with values 3&4.
    But I see that it doesnt support value property for checkbox and checked attribute doesn’t take an observableArray like the regular knockout does.
    Is there any other way I can accomplish this?
    Same applies to jqxradioButton as well.I have 4 radio buttons in my form and I have 1 value coming from my server.how do I bind that value to the values of radiobuttons?Do I need have 4 separate properties in my viewModal?

    Thanks in advance

    Peter Stoev

    Hi Azeet,

    The RadioButton and Checkbox widgets expose only 1 observable property called ‘checked’ so you can bind each widget to 1 observable property in the viewModel. Using the KO’s subscribe function, you can trigger the changes in the observables and update your observableArray.

    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.