TdxDashboardControlNotifyEvent Type
The procedural type for general dashboard-related notification events.
Declaration
TdxDashboardControlNotifyEvent = procedure(ASender: TdxCustomDashboardControl) of object;
Parameters
| Name | Type | Description |
|---|---|---|
| ASender | TdxCustomDashboardControl | Provides access to the dashboard control that raised the notification event. Tip You need to cast the parameter value to the TdxDashboardControl class to access all public API members. |
Remarks
Handle dashboard-related notification events to execute custom code in response to certain changes in your ExpressDashboards-powered application.
Code Examples
Save Dashboard Layout to File on Every Change
The following code example saves the current dashboard layout to an XML file every time a user saves pending changes in the Dashboard Designer dialog:
uses
dxDashboard.Control; // Declares the TdxDashboardControl component
// ...
procedure TMyForm.dxDashboardControl1LayoutChanged(ASender: TdxCustomDashboardControl);
begin
ASender.Layout.SaveToFile(ASender.DashboardName + '.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.Control; // Declares the TdxDashboardControl component
// ...
procedure TMyForm.dxDashboardControl1StateChanged(ASender: TdxCustomDashboardControl);
begin
ASender.State.SaveToFile(ASender.DashboardName + 'State.json');
end;
Direct TdxDashboardControlNotifyEvent Type References
The following events reference the TdxDashboardControlNotifyEvent procedural type:
- TdxCustomDashboardControl.OnLayoutChanged
- Allows you to save dashboard layout changes made in the Dashboard Designer dialog.
- TdxCustomDashboardControl.OnStateChanged
- Allows you to save dashboard/user interaction state changes.
See Also