TDBAdvGrid Editing with PageMode=False

I need to use sorting and filtering in DBAdvGrid connected to a Table or Query in order to make it easier for my customers to select the records to edit.

if PageMode is set to False, I can't use the editors in each cell and if I set PageMode to True, I can't sort or filter columns and previous sort and filter are lost.
I tried to update records using a query but the changes are not updated in the grid. If I call Grid.Update, again the filters and sorting are lost.
Any suggestion for edit a record without losing filters and sorting settings?
Best Regards

Francisco Alvarado

In this case, filtering & sorting should be performed on the dataset itself.

See BDESort demo for example how a dataset sort is started from the grid.

Is it still not possible to edit in a grid, where the grid filtering is used?
The sorting demo I saw, but what about the filtering possibilities?

We recommend to do the filtering & sorting at dataset level.

For sorting it is obvious how to overrule the sorting of the grid with own sorting on the dataset. This is shown in the BDESort demo, using the OnCanSort event.
But for Filtering, I see that I can get the filter values using OnFilterEditUpdate, but I don't see how to prevent the grid of doing the filtering itself.
Is there an example, or can you tell me which event(s) I need to use to make the filtering on the dataset and not let the grid do the filtering?

If you call Abort from this event handler, the grid won't perform the filtering but you can use the filter condition to filter the dataset.

1 Like