TdxDashboardNotifyEvent Type
The procedural type for general notification events in a TdxDashboard container.
Declaration
TdxDashboardNotifyEvent = procedure(ASender: TdxDashboard) of object;
Parameters
| Name | Type | Description |
|---|---|---|
| ASender | TdxDashboard | Provides access to the dashboard container that raised the notification event. |
Remarks
Handle dashboard-related notification events to execute custom code in response to certain changes in a TdxDashboard container.
Code Examples
Save Dashboard Layout to File on Every Change
The following code example saves the current Dashboard layout to a file in the XML format every time a user saves pending changes in the Dashboard Designer dialog:
uses
dxDashboard; // Declares the TdxDashboard class
// ...
procedure TMyForm.dxDashboard1LayoutChanged(ASender: TdxDashboard);
begin
ASender.Layout.SaveToFile(ASender.Name + '.xml');
end;
Save Dashboard State to File in Response to User Changes
The following code example saves the current dashboard user interaction state to a JSON file on every change:
uses
dxDashboard; // Declares the TdxDashboard class
// ...
procedure TMyForm.dxDashboard1StateChanged(ASender: TdxDashboard);
begin
ASender.State.SaveToFile(ASender.Name + 'State.json');
end;
Direct TdxDashboardNotifyEvent Type References
The following events reference the TdxDashboardNotifyEvent procedural type:
- TdxDashboard.OnLayoutChanged
- Allows you to save dashboard layout changes made in the Dashboard Designer dialog.
- TdxDashboard.OnStateChanged
- Allows you to save dashboard/user interaction state changes.
See Also