jQWidgets Forums

jQuery UI Widgets Forums Grid server side problem (filterrow)

This topic contains 2 replies, has 2 voices, and was last updated by  leefuchu 9 years, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • server side problem (filterrow) #72695

    leefuchu
    Participant

    Hi jqWidgets Team

    I found a strange phenomenon when i implements filter row function(server side).

    when i inputs text for searching, the filter funciton is fired once.

    but i use input text with dropdownlist for searching, the filter function is fired twice.

    Example>
    https://tagme.to/fuchu/jqxgridfilterproblem

    code ——————————————————
    var source =
    {
    datatype: “json”,
    id : ‘tsongGrid’,
    data : params,
    url: “i/sample/sampleGcsGetCust.ajax” ,
    // root: ‘grid’,
    async: false,
    datafields:
    [
    { name: ‘customerid’, type: ‘string’ },
    { name: ‘customernm’, type: ‘string’ },
    { name: ‘enterdt’, type: ‘string’ }
    ],
    updaterow: function (rowid, rowdata, commit) {
    // synchronize with the server – send update command
    // call commit with parameter true if the synchronization with the server is successful
    // and with parameter false if the synchronization failder.
    commit(true);
    },
    pager: function (pagenum, pagesize, oldpagenum) {

    },
    sort: function (data) {

    $(“#jqxgrid”).jqxGrid(‘updatebounddata’, ‘sort’);
    },
    filter: function (data) {

    $(“#jqxgrid”).jqxGrid(‘updatebounddata’, ‘filter’);
    },
    processdata: function (data) {

    },
    formatdata: function(data){

    return null;
    },
    beforeprocessing: function(data)
    {
    source.totalrecords = data.count;
    source.records = data.grid;
    },
    beforeSend: function(data){

    },
    pagechange: function(data)
    {

    }
    };

    var dataAdapter = new $.jqx.dataAdapter(source,
    {
    loadComplete: function(data){

    }
    }
    );
    // initialize jqxGrid
    $(“#jqxgrid”).jqxGrid({
    source: dataAdapter
    });
    —————————————————

    server side problem (filterrow) #72714

    Peter Stoev
    Keymaster

    Hi leefuchu,

    The filter function is called whenever filter is added or removed. If it’s called, then the Grid assummes that it is necessary the function to be called.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    server side problem (filterrow) #72725

    leefuchu
    Participant

    hi peter.

    yes, you are right. when the filter is added, filter function is fired once.

    but when i add filter by dropdownlist, filter function is fired twice. that is problem.
    (See the attached video)

    so The below of the method can not be used.

    http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxgrid/jquery-grid-php-server-side-processing.htm

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

You must be logged in to reply to this topic.