FNCGrid filters with like not working correct

Hello,

I am using the folowing filter statement to display record in a TMSNFCGrid.
try
grlProjekten.BeginUpdate;
ClientmoduleREST.FDMProject.DisableControls;
ClientmoduleREST.FDMProject.AfterScroll:=Nil;
ClientmoduleREST.FDMProject.Filtered:=False;
ClientmoduleREST.FDMProject.FilterOptions:=[foCaseInsensitive];
ClientmoduleREST.FDMProject.Filter:='Prnaam LIKE
'+QuotedStr('%'+trim(eZoekenProjekten.Text)+'%')+' or Pradres LIKE
'+QuotedStr('%'+trim(eZoekenProjekten.Text)+'%')+' or Prwnpl LIKE
'+QuotedStr('%'+trim(eZoekenProjekten.Text)+'%')+' or UITVNAAM LIKE
'+QuotedStr('%'+trim(eZoekenProjekten.Text)+'%')+' or CONTPERS LIKE
'+QuotedStr('%'+trim(eZoekenProjekten.Text)+'%');
ClientmoduleREST.FDMProject.Filtered:=True;
finally
ClientmoduleREST.FDMProject.AfterScroll:=ClientmoduleREST.FDMProjectAfterScroll;
ClientmoduleREST.FDMProject.AfterScroll(ClientmoduleREST.FDMProject);
grlProjekten.EndUpdate;
ClientmoduleREST.FDMProject.EnableControls;
end

The grid is not giving all records that are in the TFDMemTable.

When I get rid of the DisableCOntrols and BeginUpdate is working oke.

Am i missing something ?

Gert Hoogeboom

Can you just try without BeginUpdate & EndUpdate?

Pieter,
The same issue.
The record count of the dataset is correct. It looks if the rowcount of the grid is not correct.
When using only BeginUpdate and Endupdate of the grid it is working correct. ( Without Disable/Enable controls )

Gert Hoogeboom

Is there a reason you need Disable/Enable controls?

I have other components attached to the dataset.
It is getting slower on filtering and you can see them flickering.

We'll further investigate this here, but looking at the code, I suppose calling AfterScroll inside the loop shouldn't be necessary.

I have removed the afterscroll completely. But i get the same result.

Very strange, we'll investigate further as soon as possible. Could you, in the mean time try to create a small sample demonstrating the issue. Preferably with a TClientDataSet