From 8bc57bc2b9497d5d8f15e3966ac369438db0974c Mon Sep 17 00:00:00 2001 From: Nick Volynkin Date: Mon, 6 Apr 2026 08:41:19 +0300 Subject: [PATCH 1/3] delphi: Reactivate dashboard control when a new layout is set `TdxDashboardControl.Clear` makes the control inactive, so that it does not show any content (TdxDashboardControl.Active == False). Co-authored-by: Ilia Nenashev --- Delphi/uMainForm.pas | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Delphi/uMainForm.pas b/Delphi/uMainForm.pas index b1fb90b..ca36e82 100644 --- a/Delphi/uMainForm.pas +++ b/Delphi/uMainForm.pas @@ -82,6 +82,8 @@ procedure TMainForm.LoadLayoutAndState; dxDashboardControl1.Layout.Assign(DataModule1.mdLayoutsLayout); if not DataModule1.mdLayoutsState.IsNull then dxDashboardControl1.State.Assign(DataModule1.mdLayoutsState); + + dxDashboardControl1.Active := True; end; procedure TMainForm.btnDeleteClick(Sender: TObject); @@ -131,6 +133,7 @@ procedure TMainForm.gvLayoutsFocusedRecordChanged( procedure TMainForm.dxDashboardControl1LayoutChanged( ASender: TdxCustomDashboardControl); begin + dxDashboardControl1.Active := True; if DataModule1.mdLayoutsName.AsString <> dxDashboardControl1.DashboardName then begin DataModule1.mdLayouts.Append; From 815eea451facec0e4a91cc815adf89e5bc98074c Mon Sep 17 00:00:00 2001 From: Nick Volynkin Date: Mon, 6 Apr 2026 08:41:19 +0300 Subject: [PATCH 2/3] cpp-builder: Reactivate dashboard control when a new layout is set `TdxDashboardControl.Clear` makes the control inactive, so that it does not show any content (TdxDashboardControl.Active == False). Remove an unused component declaration. Co-authored-by: Ilia Nenashev --- CPB/uMainForm.cpp | 5 ++++- CPB/uMainForm.h | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CPB/uMainForm.cpp b/CPB/uMainForm.cpp index 97fbf7a..2e74150 100644 --- a/CPB/uMainForm.cpp +++ b/CPB/uMainForm.cpp @@ -74,6 +74,8 @@ void __fastcall TMainForm::LoadLayoutAndState() if (!DataModule1->mdLayoutsState->IsNull) dxDashboardControl1->State->Assign(DataModule1->mdLayoutsState); + + dxDashboardControl1->Active = true; } //--------------------------------------------------------------------------- void __fastcall TMainForm::btnDeleteClick(TObject *Sender) @@ -123,13 +125,14 @@ void __fastcall TMainForm::gvLayoutsFocusedRecordChanged( (DataModule1->mdLayouts->State != dsInsert)) { LoadLayoutAndState(); - } + } } //--------------------------------------------------------------------------- void __fastcall TMainForm::dxDashboardControl1LayoutChanged( TdxCustomDashboardControl *ASender) { + dxDashboardControl1->Active = true; if (DataModule1->mdLayoutsName->AsString != dxDashboardControl1->DashboardName) { DataModule1->mdLayouts->Append(); diff --git a/CPB/uMainForm.h b/CPB/uMainForm.h index d6b6bfd..f5909a1 100644 --- a/CPB/uMainForm.h +++ b/CPB/uMainForm.h @@ -73,7 +73,6 @@ class TMainForm : public TForm TdxLayoutItem *liBtnNew; TdxLayoutGroup *lgButtons; TdxLayoutItem *liBtnDelete; - TcxGridDBColumn *gvLayoutsState; void __fastcall btnNewDashboardClick(TObject *Sender); void __fastcall btnDeleteClick(TObject *Sender); void __fastcall btnDesignClick(TObject *Sender); From ecbb94ca506ed5378a2025c88596af43144d1a6d Mon Sep 17 00:00:00 2001 From: Nick Volynkin Date: Mon, 6 Apr 2026 08:41:19 +0300 Subject: [PATCH 3/3] readme: Reactivate dashboard control when a new layout is set `TdxDashboardControl.Clear` makes the control inactive, so that it does not show any content (TdxDashboardControl.Active == False). Remove an unused component declaration. Co-authored-by: Dmitry Eliseev --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a2be1d1..1bee505 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ This example application allows users to create new layouts/modify existing layo 1. Click the hamburger button, select the **Save** option, and close the dialog. 1. Create additional layouts if necessary. 1. Close and restart the app. - Click on grid records to switch between dashboard layouts you set up previously. +1. Click on grid records to switch between dashboard layouts you set up previously. Click **Design Dashboard** or **Delete Dashboard** to modify or delete entries. ![DevExpress Dashboards for Delphi/C++Builder — Store Dashboard Layout Definitions in a Database](./images/vcl-dashboards-store-layout-template-database.gif) @@ -113,6 +113,8 @@ begin // Load a dashboard state if it is stored in the database if not DataModule1.mdLayoutsState.IsNull then dxDashboardControl1.State.Assign(DataModule1.mdLayoutsState); + // Activate the dashboard control + dxDashboardControl1.Active := True; end; ``` @@ -121,8 +123,18 @@ To load a different dashboard in the Dashboard Control, assign a new dashboard n The assigned layout definition replaces the current definition and resets the dashboard state. You can also clear the Dashboard Control using [TdxCustomDashboardControl.Clear]. +The `Clear` function disables the `TdxCustomDashboardControl.Active` property. +Once you assign a new dashboard layout (and, optionally, a UI interaction state), +you must activate the dashboard control. + +#### Delphi +```delphi + dxDashboardControl1.Active := True; +``` + + ### Step 3: Display the Dashboard Designer Once you assign a dashboard layout definition to the Dashboard Control,