vcl-dxdashboard-dot-control-f960fdff.md
The procedural type for general dashboard-related notification events.
TdxDashboardControlNotifyEvent = procedure(ASender: TdxCustomDashboardControl) of object;
| 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.
|
Handle dashboard-related notification events to execute custom code in response to certain changes in your ExpressDashboards-powered application.
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;
#include "dxDashboard.Control.hpp" // Declares the TdxDashboardControl component
// Add the following linker directive to the corresponding CPP source file:
#pragma link "dxDashboard.Control" // Required to use dxDashboard.Control.hpp declarations
// ...
void __fastcall TMyForm::dxDashboardControl1LayoutChanged(TdxCustomDashboardControl *ASender)
{
ASender->Layout->SaveToFile(ASender->DashboardName + ".xml");
}
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;
#include "dxDashboard.Control.hpp" // Declares the TdxDashboardControl component
// Add the following linker directive to the corresponding CPP source file:
#pragma link "dxDashboard.Control" // Required to use dxDashboard.Control.hpp declarations
// ...
void __fastcall TMyForm::dxDashboardControl1StateChanged(TdxCustomDashboardControl *ASender)
{
ASender->State->SaveToFile(ASender->DashboardName + "State.json");
}
The following events reference the TdxDashboardControlNotifyEvent procedural type:
TdxCustomDashboardControl.OnLayoutChangedAllows you to save dashboard layout changes made in the Dashboard Designer dialog.TdxCustomDashboardControl.OnStateChangedAllows you to save dashboard/user interaction state changes. See Also
TdxDashboardControlExportEvent Procedural Type