EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Stefan B. on June 12, 2014, 05:43:15 AM



Title: datagrid row filter - How can is set the default operation for type=text
Post by: Stefan B. on June 12, 2014, 05:43:15 AM
How can is set the default operation for filter input type=text ?

At this time, this operation is fixed to "contains" in the file datagrid-filter.js
There should be an default attribute for this where we can set the dafault operation type to "equals" or other.

(We would not use an filter icon to handle this problem. When the user enter a text in the field the filter operation should be done)


Title: Re: datagrid row filter - How can is set the default operation for type=text
Post by: stworthy on June 12, 2014, 06:37:08 PM
The 'defaultFilterType','defaultFilterOperator' and 'defaultFilterOptions' properties are available now. Please download the newest 'datagrid-filter.js' file from http://jeasyui.com/extension/datagrid_filter.php. To change the default filter operator, try this:
Code:
$('#dg').datagrid({
  defaultFilterOperator: 'equal'
});


Title: Re: datagrid row filter - How can is set the default operation for type=text
Post by: Stefan B. on June 12, 2014, 11:46:10 PM
Great!  :)
This is exactly the solution we were looking for - THX