ParamQuery grid support forum
General Category => Help for ParamQuery Grid (free version) => Topic started by: iamgsprabhu on May 17, 2016, 02:24:52 am
-
Hi,
I am trying to implement the Remote filter option in the grid, I am not sure what am I missing.
Here are the step I have done:
1. colModel: { title: "Country", width: "160", align: "left", dataIndx: "COUNTRY_NAME",
filter: { type: 'textbox', condition: 'begin', listeners: ['keyup'] }
}
2. filterModel: { on: false, mode: "AND", header: true }
3. dataModel: {
location: "remote",
sorting: "local",
dataType: "JSON",
sortIndx: "COUNTRY_NAME",
recIndx: "COUNTRY_NAME",
method: "GET",
getData: function (dataJSON) {
var data = dataJSON.data;
//expand the first row.
data[0]['pq_detail'] = { 'show': true };
return { data: data };
}
Whenever I type any thing on the Filter option, it does not filter, but show the entire dataset.
Please advice, what am I Missing ?
thx
Prabhu
-
filterModel.on should be true.
-
I changed the filterModel on as true, still no luck
Is it required to specify the filter.option ?
When I put a debbuger on the getData: function, I see that it is getting all the dataJson has recordFiltered: null.
data:Array[1432]
draw:null
error:null
fieldErrors:Array[0]
id:null
meta:Object
options:Object
recordsFiltered:null
recordsTotal:null
row:null
__proto__:Object
-
When dataModel.location is 'remote' grid expects remote filtering.
To specify local filtering, add type: 'local' to filterModel
filterModel: { on: true, mode: "AND", header: true, type: 'local' }
-
put logic on the remote side and it works like gem.
thanks for the help.