jQWidgets Forums
jQuery UI Widgets › Forums › Grid › server side problem (filterrow)
Tagged: filter row server side
This topic contains 2 replies, has 2 voices, and was last updated by leefuchu 9 years, 10 months ago.
-
Author
-
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/jqxgridfilterproblemcode ——————————————————
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
});
—————————————————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 StoevjQWidgets Team
http://www.jqwidgets.comhi 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.
-
AuthorPosts
You must be logged in to reply to this topic.