Setting the default filter operator via script

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
kklosson
Posts: 1628
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Setting the default filter operator via script

Post by kklosson »

In extJS, a column filter defaulted to a "contains" operation. In Kendo, it defaults to "equals". I've looked at the Kendo documentation but can't see how to set the default operation to "contains". Can anyone offer me a start?
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
BLOMASKY
Posts: 1473
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: Setting the default filter operator via script

Post by BLOMASKY »

I have not used it, but support suggested the following: (of course, change the "AttributeName" to the appropriate one") and put in the initialization script.



for (var i = 0; i < config.columns.length; ++ i)
{
if (config.columns.field == "AttributeNameCorrespondingToColumnWithFilter")
config.columns.filterable.cell = { operator: "contains" };
}
kklosson
Posts: 1628
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: Setting the default filter operator via script

Post by kklosson »

Hory cow! I just realized that you can set the default filter operation right in the query config. It was hiding in plain sight.

AwareIM is awesome!
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
Post Reply