Error in multi column Filter

I have this code. But when i change my filter ( i type), i get this error. When First error occurs, i will try again , so second error occurs.

first error:
ej2.min.js:181189 Uncaught TypeError: Cannot read property 'field' of undefined
    at a (ej2.min.js:181189)
    at e.removeFilteredColsByField (ej2.min.js:181212)
    at e.onTimerTick (ej2.min.js:181293)
    at ej2.min.js:181279
a @ ej2.min.js:181189
e.removeFilteredColsByField @ ej2.min.js:181212
e.onTimerTick @ ej2.min.js:181293
(anonymous) @ ej2.min.js:181279
setInterval (async)
e.startTimer @ ej2.min.js:181278
e.processFilter @ ej2.min.js:181275
e.keyUpHandler @ ej2.min.js:181230
e.notify @ ej2.min.js:20577
t.notify @ ej2.min.js:22369
t.keyActionHandler @ ej2.min.js:177720
r.keyPressHandler @ ej2.min.js:22939

second error:
ej2.min.js:178732 Uncaught TypeError: i[t[o].predicate] is not a function
    at Function.e.generatePredicate (ej2.min.js:178732)
    at Function.e.getPredicate (ej2.min.js:178727)
    at e.filterQuery (ej2.min.js:170174)
    at e.generateQuery (ej2.min.js:170074)
    at e.refreshDataManager (ej2.min.js:172506)
    at e.<anonymous> (ej2.min.js:172462)
    at e.notify (ej2.min.js:20579)
    at t.e.trigger (ej2.min.js:22064)
    at e.refresh (ej2.min.js:172447)
    at e.notify (ej2.min.js:20577)


my code: 
var grid = document.getElementById("Grid").ej2_instances[0]
if (args.value == null) {
grid.clearFiltering("Id");
args.value = ""
} else {
try {
var s = new ej.data.Predicate("Id", "greaterthan ", 2);
var s1 = new ej.data.Predicate("Id", "lessthanorequal ", 4);
grid.filterModule.filterSettings.columns.push(s);
grid.filterModule.filterSettings.columns.push(s1);
} catch (e) {
console.log(e);
}
console.log('done');
}

1 Reply

AG Ajith Govarthan Syncfusion Team June 14, 2021 12:14 PM UTC

Hi reza, 
  
Thanks for contacting Syncfusion support. 
  
Query: I have this code. But when i change my filter ( i type), i get this error. When First error occurs, i will try again , so second error occurs. 
  
Based on your query you are facing issue when changing the filter type in your Grid application. So, before we procced to your query please share the below details to find the root cause of the issue. 
  
  1. If possible, please share the issue reproducible sample.
  
  1. Share the complete Grid code example.
  
  1. Share the screenshot or video demonstration of the reported issue.
  
  1. Please let us know how you are changing the type of the filter.
  
  1. Share the Syncfusion package version.
  
Regards, 
Ajith G. 


Loader.
Up arrow icon