Depends on the underlying data source for the grid.
For TDbf you can use the filter property to select the records shown in the grid. The record count is problematic though.
For a sql-based dataset, you can use a paramterized query with a "WHERE" clause to select rows that match. The record count would be correct for it too.