Grid filter

I'm trying to manually apply the filter to a grid.

However, if I have some spacing in my filter, it doesn't work properly.

For example, I have a column with the following value: Cruz Alta.

If I search for "ruz alt", only "Cruzaltense" is returned (it is a valid record).



procedure TForm1.Edit1Change ( Sender : TObject);
const
    ACondition : String = '*';
var
    i : Integer;
begin
    TMSFNCGrid1.RemoveFilters;


    if Edit1.GetTextLen > 0 then
    begin
        for i := 0 to TMSFNCGrid1.Columns.Count - 1 do
        begin
            with TMSFNCGrid1.Filter.Add do
            begin
                Column := i;
                CaseSensitive := False;


                if i > 0 then
                    Operation := foOR;


                Condition := ACondition + Edit1.Text + ACondition;
            end;
        end;


        TMSFNCGrid1.ApplyFilter;
    end;
end;


Is it a bug?

Please add double quotes to the condition to also include words with spacing:


Condition := ACondition + '"' + Edit1.Text + '"' + ACondition;

It works, thank you!