Skip to main content
All docs
V25.2
  • TdxCustomDashboardControl.OnLayoutChanged Event

    Allows you to save dashboard layout changes made in the Dashboard Designer dialog.

    Declaration

    property OnLayoutChanged: TdxDashboardControlNotifyEvent read; write;

    Remarks

    Handle the OnLayoutChanged event to execute custom code in response to dashboard layout updates.

    Event Occurrence

    The OnLayoutChanged event occurs in response to every Layout property value change.

    Event Parameter

    The ASender parameter provides access to the TdxDashboardControl component that raised the OnLayoutChanged event.

    Code Example: 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;
    
    See Also