jQWidgets Forums

jQuery UI Widgets Forums Grid All filterrow checkedlist items checked after updatebound.

This topic contains 4 replies, has 2 voices, and was last updated by  williamtourinho 12 years, 4 months ago.

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

  • williamtourinho
    Participant

    Hi, i have a problem with the filterrow checkedlist grid when i do a updatebound.
    The problem is this one:
    When i do a updatebound of the grid all unchecked values in the checkedlist becomes checked but the filter continues working.
    I have tried to make the “$(‘#JqxGrid’).jqxGrid(‘applyfilters’)” in the bindingcomplete but it just works one the first updatebound, when i do a updatebound again all items of the checkedlist becomes checked again.

    What can i do?
    Thanks.


    Peter Stoev
    Keymaster

    Hi williamtourinho,

    Could you provide an example of your scenario, sample code which we can test locally?

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    williamtourinho
    Participant

    Try unchked some items in the product checklist. Whait for the updatebounddata and you will see that all the items in the check list are selected.
    Thanks.
    Here is the example:

    widgets

    $(document).ready(function () {
    var theme = ”;

    var data = [];
    for (var i = 0; i < 10; i++){
    var row = {};
    row["name"] = "Name " + parseInt(Math.random()* 100);
    row["productname"] = "Product " + i;

    data[i]= row;
    }

    function updateData() {
    for (var i = 0; i < 10; i++){
    var row = {};
    data[i]["name"] = "Name " + parseInt(Math.random()* 100);
    }
    }

    var source =
    {
    localdata: data,
    datatype: "array"
    };

    var dataAdapter = new $.jqx.dataAdapter(source);
    $("#jqxgrid").jqxGrid(
    {
    width: 685,
    source: dataAdapter,
    showfilterrow: true,
    filterable: true,
    theme: theme,
    selectionmode: 'multiplecellsextended',
    columns: [
    { text: 'Name', columntype: 'textbox', filtertype: 'textbox', filtercondition: 'starts_with', datafield: 'name', width: 115 },
    {
    text: 'Product', filtertype: 'checkedlist', datafield: 'productname', width: 220
    }
    ]
    });

    function UpdateTimerFunction () {
    updateData();
    $('#jqxgrid').jqxGrid('updatebounddata');
    }

    var UpdateTimerIntervalId = setInterval(UpdateTimerFunction, 5000);

    });


    Peter Stoev
    Keymaster

    Hi williamtourinho,

    We confirm the reported behavior. We will do our best to improve it for the next version. Unfortunately, we can’t suggest you a workaround for such scenario.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    williamtourinho
    Participant

    Ok Peter Stove, thanks for your feedback again.
    I will wait for the next version:)

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

You must be logged in to reply to this topic.