TMS FMX Grid multi option filtering

I need to filtering tmsfmxgrid with few filter conditions. When I use 2 filter conditions and filter.operation:=foOR it works correctly, but when I try to make 3 or more conditions it displays empty grid. How to use more than two filter conditions?

Can you send us a sample that demonstrates this?

It is unclear how we can reproduce this without more information about the data and the filters.

Kind Regards, 
Pieter
There is my filtering procedure (in grid1 I got only text):

procedure form1.filtr1(sender: TObject)
var
fd: TFilterData;
begin
grid1.filter.clear;
  if checkbox1.ischecked=true then 
   begin
     fd :=grid1.Filter.Add;
     fd.Column := 7;
     fd.Condition := ‘New’;
   end;

  if checkbox2.ischecked=true then 
   begin
     fd :=grid1.Filter.Add;
     fd.Column:=7;
     fd.Condition := ‘Downloaded’;
   end;

  if checkbox3.ischecked=true then 
   begin
    fd :=grid1.Filter.Add;
    fd.Column:=7;
    fd.Condition := ‘Proceed’;
   end;

fd.Operation := foOR;
grid1.ApplyFilter;
end;

Example of use:
filtr1(self);

When I use only 2 conditions it works correctly, but when I got more then 2 conditions it displays empty grid.

Can you provide us some data that we can use to test here?

Now I don't have access to my computer. My method of filling table:  search for files on disk, and depending on the file name completes the table. I also tried to fill the table manually, but after filtering the result was the same.

For three operations you need the first operation to be none, and the second and third operation to be OR. According to your code only the last filterdata operation is set to OR.

The correct code would be:

procedure form1.filtr1(sender: TObject)
var
fd: TFilterData;
begin
grid1.filter.clear;
  if checkbox1.ischecked=true then 
   begin
     fd :=grid1.Filter.Add;
     fd.Column := 7;
     fd.Condition := ‘New’;
   end;

  if checkbox2.ischecked=true then 
   begin
     fd :=grid1.Filter.Add;
     fd.Column:=7;
     fd.Condition := ‘Downloaded’;
     if grid1.Filter.Count > 0 then
       fd.Operation := foOR;
   end;

  if checkbox3.ischecked=true then 
   begin
    fd :=grid1.Filter.Add;
    fd.Column:=7;
    fd.Condition := ‘Proceed’;
     if grid1.Filter.Count > 0 then
       fd.Operation := foOR;
   end;

grid1.ApplyFilter;
end;

And if I have more conditions? Eg. For 5 conditions: the first three will be Filter.operation: = foNONE and the last two foOR? Am I right?

Only the first condition must be None. The conditions that follow need to be OR.


Kind Regards, 
Pieter

I try it and it doesn't work. Otherwise: works, but only if two conditions are checked at the same time. When the number of active conditions is greater than 2 - no filtering anything. I got delphi XE5 and TMS Pack for FireMonkey  2.2.2.4, maybe this is important?

We cannot reproduce an issue. If a problem persists with the latest version of TMS Pack for FireMonkey v2.8, please send via email to support some sample source code project with which we can reproduce the issue here.