TdxCustomDashboardControl.OnStateChanged Event
Allows you to save dashboard/user interaction state changes.
Declaration
property OnStateChanged: TdxDashboardControlNotifyEvent read; write;
Remarks
Handle the OnStateChanged event to execute custom code in response to dashboard state changes.
Event Occurrence
The OnStateChanged event occurs in response to every State property value change (for example, when users resize data visualization items, modify filter criteria, etc.).
Event Parameter
The ASender parameter provides access to the TdxDashboardControl component that raised the OnStateChanged event.
Code Example: 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;
See Also