This section covers Tool Panels, available via the grid's Side Bar, which allow for easy access to powerful grid operations such as grouping, pivoting, and filtering. Custom Tool Panels can also be provided to the grid.
Overview
Tool Panels are panels that sit in the Side Bar to the right of the grid. The Side Bar allows access to the tool panels via buttons that work like tabs. The Side Bar and a Tool Panel are highlighted in the screenshot below.
The following events are emitted from the tool panel.
toolPanelVisibleChanged
ToolPanelVisibleChangedEvent
The tool panel was hidden or shown. Use api.isToolPanelShowing() to get status.
onToolPanelVisibleChanged = (
event: ToolPanelVisibleChangedEvent<TData>
) => void;
interface ToolPanelVisibleChangedEvent<TData = any, TContext = any> {
source: string | undefined;
// The grid api.
api: GridApi<TData>;
// The column api.
columnApi: ColumnApi;
// Application context as set on `gridOptions.context`.
context: TContext;
// Event identifier
type: string;
}
toolPanelSizeChanged
ToolPanelSizeChangedEvent
The tool panel size has been changed.
onToolPanelSizeChanged = (
event: ToolPanelSizeChangedEvent<TData>
) => void;
interface ToolPanelSizeChangedEvent<TData = any, TContext = any> {
// Event identifier
type: 'toolPanelSizeChanged';
// True if this is the first change to the Tool Panel size.
started: boolean;
// True if this is the last change to the Tool Panel size.
ended: boolean;
// New width of the ToolPanel component.
width: number;
// The grid api.
api: GridApi<TData>;
// The column api.
columnApi: ColumnApi;
// Application context as set on `gridOptions.context`.
context: TContext;
}
Next Up
Before covering the Tool Panels in detail, continue to the next section to learn about the Side Bar.