The next example creates a new filter criterion which limits data values. Only values that begin with the ‘Mc’ sub-string are accepted. The PercentWildcard property is set to ‘*’ for demonstrative purposes only.
FDataController.Filter.PercentWildcard := '*';
FDataController.Filter.BeginUpdate;
try
FDataController.Filter.Root.Clear;
FDataController.Filter.Root.AddItem(DBTableView1Customer, foLike, 'Mc*', 'Mc...');
finally
FDataController.Filter.EndUpdate;
end;
FDataController->Filter->PercentWildcard = "*";
FDataController->Filter->BeginUpdate();
try {
FDataController->Filter->Root->Clear();
FDataController->Filter->Root->AddItem(DBTableView1Customer, foLike, "Mc*", "Mc...");
} __finally {
FDataController->Filter->EndUpdate();
}