Frage

I have a page data load in flexigrid, after loading there are several filters, onchange filter i try to reload the grid like this

var data = {name: 'fltr_county', value: $("#fltr_county").val(), name: 'county_ene', value:$("#county_ene").val()}

$('.flexme').flexOptions({params: [ data ]}).flexReload();

But got only 'page=1&rp=25&sortname=Borrower&sortorder=asc&query=&qtype=&county_ene=equal' posting array. Only last param value got.

How i can pass more filter in posting array? Please help. Thanks in advance

War es hilfreich?

Lösung

Im new to Flexigrid.. but faced same situation and used this code.. its working for me.. im hopeful that your problem can be solved..

var query = $("#fltr_county").val();

var data = {"groupOp":"all","rules":[{"field":"fltr_county","op":"ew", "data": '"'+query+'"'}]};
$('#flex2').flexOptions({
    filters : data,
    qtype : "admin_client_contract_id",
    query : query,
    }).flexReload(); 

Andere Tipps

This works for me:

$('#useTimeRange').change(function() {
if( this.checked ) {    //limit events to timestamp range
    //alert("Checked " + startTime + " " + endTime);
    var data = {name: 'startTime', value: $("#startTime").val()};
    var data2= {name: 'endTime',  value:$("#endTime").val()};
    $('.flex5').flexOptions({params: [ data, data2 ]}).flexReload();        
}

Here's my UI and firebug:

flexigrid extra params

according to me In data you are not passing parameters as per as syntax of json

try some thing like this

var data = {name: 'fltr_county', value: $("#fltr_county").val()},{ name: 'county_ene',value:$("#county_ene").val()}

I hope this will help

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top