jQWidgets Forums

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts

  • dougcurl
    Participant

    Just came across this post, and I think this is a solution for building a query string with the filter data (needed this to send to a map service which plots the same data in the table) – in case anyone needs this:

    ` $(“#jqxgrid”).on(“filter”, function(event){
    var f = 0
    var filterQstr = “”
    var filterinfo = $(“#results_grid”).jqxGrid(‘getfilterinformation’);
    $.each(filterinfo, function( i, val){
    filterQstr += “&filterdatafield”+f+”=”+filterinfo[i].datafield
    filterQstr += “&”+filterinfo[i].datafield+”operator=”+filterinfo[i].filter.operator
    $.each(filterinfo[i].filter.getfilters(), function(x){
    filterQstr += “&filtervalue”+f+”=”+filterinfo[i].filter.getfilters()[x].value
    filterQstr += “&filtercondition”+f+”=”+filterinfo[i].filter.getfilters()[x].condition
    filterQstr += “&filteroperator”+f+”=”+filterinfo[i].filter.getfilters()[x].operator
    //add up filters:
    f += 1
    });
    });
    });

Viewing 1 post (of 1 total)