EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Fabrice on August 29, 2014, 09:30:46 AM



Title: Enable/Disable filterRow in datagrid
Post by: Fabrice on August 29, 2014, 09:30:46 AM
I would like to have a toggle button for Enable(show), Disable(hide) filterRow in datagrid,I know how to show this row with EnableFilter but how can i do to hide this row?


Title: Re: Enable/Disable filterRow in datagrid
Post by: stworthy on August 30, 2014, 06:03:23 AM
To hide the filter bar, try this:
Code:
$('#dg').datagrid('getPanel').find('tr.datagrid-filter-row').hide();
$('#dg').datagrid('resize');


Title: Re: Enable/Disable filterRow in datagrid
Post by: Fabrice on August 30, 2014, 08:38:59 AM
that's perfect,

I add these two lines :

$('#dg').datagrid('removeFilterRule');
$('#dg').datagrid('doFilter');

to remove filters when filterbar is hidden

Thank you.


Title: Re: Enable/Disable filterRow in datagrid
Post by: roberto on February 21, 2016, 09:35:30 PM
This does not work if view is groupview.
Any idea?