jQWidgets Forums

jQuery UI Widgets Forums Lists DropDownList checkchange event problem

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • checkchange event problem #29636

    Dundee
    Participant

    Hi,

    i have that kind of code :

    $("#cblSitesUpload").on('checkChange', function (event) {
    var item=event.args.item;
    if (item.value == 0 && !item.checked) {
    $("#cblSitesUpload").jqxDropDownList('checkAll');
    $("#cblSitesUpload").jqxDropDownList('uncheckIndex',0);
    }
    });

    This dropdown list regroup a list of item..and when i unselect the “All item” checkbox..i need to checkall item except the the one i just uncheck……but when i test this code..it’s fire error like this “item is undefined”

    What i do wrong??

    I readed on this forum that checkall fire event for all event..but if it’s work for the first one i uncheck..why this error..

    checkchange event problem #29648

    Peter Stoev
    Keymaster

    Hi Dundee,

    The problem is that you do check/uncheck in a ‘checkChange’ event. ‘checkAll’ will raise ‘checkChange’ and so do ‘uncheckIndex’. Implementation with ‘checkAll’ is already available – http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/customfiltering.htm?arctic

    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.