How to clear filter manually via code

Hello

Sometimes I use TTMSFMXTableView on my Apps, in some cases I need to use the filter option, but my users can forward in a pagecontrol tabs, if they get back to the first tab how can I remove the filter on the tableview?

I use "ApplyFilter(EmptyStr)" but how can I delete on the filter area anything and remove the "X" button?

Hi,

You can do this via

  TMSFMXTableView1.ApplyFilter('');
  TMSFMXTableView1.GetSearchEdit.Text := '';

Your solution is not working, gave me error, attached images below


Please call

TMSFMXTableView1.NeedStyleLookup;
TMSFMXTableView1.ApplyStyleLookup;
TMSFMXTableView1.ApplyFilter('');
TMSFMXTableView1.GetSearchEdit.Text := '';

Thanks that code did the trick

1 Like