jQWidgets Forums

jQuery UI Widgets Forums Editors CheckBox, RadioButton Set checkbox without propagation of event

Tagged: 

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Set checkbox without propagation of event #29503

    techie.brandon
    Participant

    Is it possible to set the state of the checkbox but not have the bound events notified?

    $(‘body’.).append(“

    ✓ All

    “)
    slectAllCheckbox = $(‘#selectAllCheckbox’)
    selectAllCheckbox.jqxCheckBox( checked: @search.results.selected.all, disabled: true )
    selectAllCheckbox.bind ‘checked’, @search.results.selected.addAll
    selectAllCheckbox.bind ‘unchecked’, @search.results.selected.clear

    I would like to be able to do something like the following and not have the ‘checked’ or ‘unchecked’ event raised:

    slectAllCheckbox.jqxCheckBox({ checked: true, propagateEvents: false })
    slectAllCheckbox.jqxCheckBox({ checked: false, propagateEvents: false })

    Do you have any hooks in the API I could leverage to obtain this functionality?

    Set checkbox without propagation of event #29514

    Peter Stoev
    Keymaster

    Hi techie.brandon,

    The correct solution would be, if you disable your code in the event handler when you manually check/uncheck a checkbox. We do not have code that disables the widget’s events and as that is a type of “hack” we will most probably never implement it.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.