Blog
All Blog Posts | Next Post | Previous Post
Filtering in Delphi: See the Filter Dialog in Action
Today
In the previous blog post, we explored how TTMSFNCDataSetFilterDialog and TTMSFNCFilterDialog allow users to build complex filters through a guided visual interface instead of manually writing filter expressions.
While screenshots explain the concepts, seeing the components in action often gives a much better idea of how quickly complex filters can be created.
That's why we'd like to share the following demonstration, showcasing both dialogs in a real application.
What You'll See
The video starts with a quick demonstration of the TTMSFNCDataSetFilterDialog, showing how a filter can be created for a TDataSet without manually writing the filter expression.
It then continues with a more extensive demonstration using TTMSFNCFilterDialog together with TTMSFNCDataGrid, where you'll see how users can create even complex nested filters through a visual interface.
Among other things, the video demonstrates:
- Selecting fields instead of typing field names.
- Showing only operators that are valid for the selected field type.
- Building nested
ANDandORgroups visually. - Generating the correct filter expression automatically.
- Applying the resulting filter directly to the grid.
New Since TMS FNC UI Pack 7.2
The video was recorded before the release of TMS FNC UI Pack 7.2.
Since then, another useful feature has been added.
The TTMSFNCDataSetFilterDialog is now also available as the design-time editor for the Filter property of a TDataSet.
Instead of manually typing a filter expression in the Object Inspector, you can now simply open the visual editor, build the filter, and have the generated filter text written back to the dataset automatically.
This makes creating dataset filters during development considerably easier, especially for more complex expressions.
The Same FilterBuilder Foundation
Both dialogs are built on top of the same TTMSFNCFilterBuilder introduced earlier in this series.
Whether the filter is created programmatically, through the visual dialogs, or later through the Filter View, the same structured filtering model is used throughout.
This means the generated filter can still be:
- assigned directly to a
TDataSet - parsed back into a visual representation
- validated against your own data
- generated in different filter formats
What's Next?
So far we've looked at building filters either through code or through a dialog.
In the next part of this series, we'll remove the dialog altogether.
Instead, users will simply interact with checkboxes, combo boxes, sliders and date pickers while the filter is updated automatically in the background using TTMSFNCFilterView.
Gjalt Vanhouwaert
Related Blog Posts
-
Filtering in Delphi: From Strings to Structured Logic
-
Filtering in Delphi: Generating, Parsing and Matching Filters
-
Filtering in Delphi: Visual Filter Building
-
Filtering in Delphi: See the Filter Dialog in Action
This blog post has not received any comments yet.
All Blog Posts | Next Post | Previous Post