OK, here is a solution for the question I asked in my earlier reply. Just in case someone else has the same issue...
Thanks Jarry for your reply.
Calling loaddata after enableFilter does solve the problem. Can you please give me a tip how can the data be loaded belatedly using an url?
In order to load the data using an url after calling enableFilter, you need to do the following:
set the url option after calling enableFilter and then apply your filterRules by calling addFilterRule. Here an example:
// define edatagrid (don't set url option)
$('#edBookMin').edatagrid({
title:'Available books',
pagination: true,
fitColumns: false,
idField: 'idString', //this field is used for editing and delete rows with a datagrid
sortName: 'waveName',
idField: 'idString',
saveUrl: 'addBook.do', //to add a new book
updateUrl: 'editBook.do', // to save edit data
//url: 'getEntitiesByCriteriaPagination.do?eN=minversion.MyBooksMinVersion',
queryParams: getBookObjectListReqParameter(),
frozenColumns:[[
............
]],
columns:[[
............
]],
//data load success
onLoadSuccess:function(data){
............
},
onBeforeSave: function(index) {
............
}
});
// apply custom filters
$('#edBookMin').datagrid('enableFilter', [{
field: 'listprice',
type: 'numberbox',
options: {
precision: 1
},
op: ['equal', 'notequal', 'less', 'greater']
}, {
field: 'unitcost',
type: 'numberbox',
options: {
precision: 1
},
op: ['equal', 'notequal', 'less', 'greater']
}
}]);
// now set URL
$('#edBookMin').datagrid('options').url = 'getEntitiesByCriteriaPagination.do?eN=minversion.MyBooksMinVersion';
// initialize datagrid with some filter rules (filterRules)
var edBookMinDefaultPreFilterRule = {field:'listprice',op:'greater',value:'5'};
$('#edBookMin').datagrid('addFilterRule', edBookMinDefaultPreFilterRule);
Note: upon calling addFilterRule, the 'doFilter' gets triggered and the data is loaded.