Using a TTMSFNCGrid and a TTMSFNCGridDatabaseAdapter, is there any way to implement Filtering?
At the moment I've got as far as using OnNeedFilterDropDownData to populate the filter menu by hand, and then using OnFilterSelect to try and filter the data the dataset directly, but it doesn't feel like this is an approach that will work.
When you use TTMSFNCGridDatabaseAdapter, the filtering indeed needs to be done at dataset level. In the OnFilterSelect, get the selected filter condition and apply it to the dataset. Call Abort; from this event handler to stop further processing from the grid itself for filtering.
Unless I'm not understanding you correctly, calling abort; in the OnFilterSelect results in repeating calls to my event handler.
By calling Abort in the event handler, code is now not called in your procedure TTMSFNCCustomGrid.HandleFilterTimer(Sender: TObject);
Specifically, the timer is never disabled, and this is what is causing the repeated calls to my event handler.
My event handler at the moment is pretty simple.
procedure TForm1.TMSFNCGrid1FilterSelect(Sender: TObject; Col: integer;
var Condition: string);
begin
// Use Col and Condition to prepare and apply a filter for FDataset
Abort;
end;