Check documentation for the latest version of dhtmlxSuite beforeFilter DHTMLX Docs


The event occurs before data loading and allows to customize filtering of dataset.

<cfset conn.event.attach("beforeFilter",handlerFunc)>

Parameters handlerFunc:

  • filter_by - FilterInterface object


  • Available for Grid, Combo


<cffunction name="custom_filter">
    <cfargument name="filter_by">
        <!--- changes WHERE some_field LIKE '%value%' to the WHERE some_field gt 'value' --->
    <cfset var index=ARGUMENTS.filter_by.index("some_field") >
        <!---  there is client side input for the filter --->
    <cfif index> 
        <cfset ARGUMENTS.filter_by.rules[index]["operation"]=">">   
<cfset conn.event.attach("beforeFilter",custom_filter)>
Back to top