DBadvGrid, FireDac Memtable, LIKE

Hi

I thought I will try this again as I realise that my previous approach at highlighting this bug probably left room for doubt. For one the project required a third-party component that I had overlooked.


Here is a application made with Delphi XE5 DBadvGrid and TFDMemTable



https://www.dropbox.com/s/dsov1usi013jqr0/FilterTest2.zip


Here is the code which work correctly if the grid is a standard DBGrid. However, this does not work with a TMD DBAdvGrid

Can you please take a look and see why your component doesn't work?

The zip file is as simple as can be, no other units or third party components apart from your own.

Please take a look.

regards

R


procedure TForm11.Button1Click(Sender: TObject);
begin
  FDMemTable1.FilterOptions := [foCaseInsensitive];
  FDMemTable1.Filter := 'text like '+QuotedStr('ca%');
  FDMemTable1.Filtered := true;
end;

procedure TForm11.Button2Click(Sender: TObject);
begin
  FDMemTable1.Filtered := false;
end;

procedure TForm11.FormCreate(Sender: TObject);
var i : integer;
begin
 for i := 0 to 100 do
   begin
     FDMemTable1.Insert;
     FDMemTable1id.AsInteger := i;
     FDMemTable1text.AsString := 'c'+chr(65+random(10));
     FDMemTable1.Post;
   end;
end;

We will investigate this as soon as possible.

By the way, are you using Delphi XE5 update 2?

Yes, correct. Thanks looking forward to a fix. It appears to fail on all tms DBaware components from what i can see

When I change in your project grid.DataSetType = dtNonSequenced, it works as expected here.

That sounds good, I will try it when I get in to the office.

Can you explain what dtNonSequenced means. 

Basically sets that your dataset will return a buffer of records in a sequential way or non sequential way and this different dataset behavior requires different handling in the TDBAdvGrid.