Title: Datagrid filter new filter operation Post by: acreonte82 on March 26, 2020, 03:11:42 AM Hello to all,
i've a need to implement a new filter operation in datagrid. How I can implement the "IN" operator in filter for text separated by comma? Ex: in filter box i write : txt1,tx2 After selected the "IN" operator, i will expect the 'filterRules' parameter will be formated in this way: filterRules: [{"field":"filed_X","op":"in","value":"'txt1','txt2'"}] Someone can help me? Thanks Title: Re: Datagrid filter new filter operation Post by: jarry on March 26, 2020, 08:24:26 PM Please extend an 'in' operator.
Code: $.extend($.fn.datagrid.defaults.operators, { And then apply this 'in' operator to the field using the 'defaultFilterOperator' property. Code: dg.datagrid('enableFilter', [{ Title: Re: Datagrid filter new filter operation Post by: acreonte82 on March 28, 2020, 08:23:31 AM Thanks!!
|