Frequently Asked Component Specific Questions
Options |
|
Display all FAQ items |
Displaying items 1 to 1 of 1, page 1 of 1
<< previous next >>

TAdvStringGridProgrammatically show the filter dropdown for a grid column
When auto filtering is enabled, the filter is shown with: grid.ShowFilterDropDown(Column).
This way it is possible to hook-up the filter dropdown also to a hotkey for example instead of having it shown only when the mouse clicks the filter icon.
This code snippet how the Ctrl-F5 hotkey can show the filter dropdown for example:
procedure TForm1.AdvStringGrid1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if (ssCtrl in Shift) and (Key = VK_F5) then
AdvStringGrid1.ShowFilterDropDown(AdvStringGrid1.Col);
end;