Posted 11 July 2018, 3:09 am EST
I need to have a user enter in the column filter textbox (NOT the advanced filter popup) multiple string entries delimited by a semicolon.
I can get this to work, but then the other columns are no longer able to work for filtering.
In the this.cvPaging.filter = (item:any) => {} … method, I have the following code as an example of a filter that will accept a “;” separated list from EntityID, and filter on multiple values correctly, but will never filter on EntityName…
How can I solve this?
var filterValEntityIDList = this.gridColumnFilterList.EntityID.split(';');
if(filterValEntityID){
for(var x = 0; x < filterValEntityIDList.length; x++){
if (item.EntityID.toLowerCase().indexOf(filterValEntityID.toLowerCase()[x]) > -1) {
return true;
}
}
return false;
}
var filterValEntityName = this.gridColumnFilterList.EntityName;
if(filterValEntityName){
if (item.EntityName.toLowerCase().indexOf(filterValEntityName.toLowerCase()) < 0) {
return false;
}
}