Skip to content

Commit 9c3a30d

Browse files
committed
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.
1 parent 03bb004 commit 9c3a30d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ This example application allows users to create new layouts/modify existing layo
2929
1. Click the hamburger button, select the **Save** option, and close the dialog.
3030
1. Create additional layouts if necessary.
3131
1. Close and restart the app.
32-
Click on grid records to switch between dashboard layouts you set up previously.
32+
1. Click on grid records to switch between dashboard layouts you set up previously.
3333
Click **Design Dashboard** or **Delete Dashboard** to modify or delete entries.
3434

3535
![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
113113
// Load a dashboard state if it is stored in the database
114114
if not DataModule1.mdLayoutsState.IsNull then
115115
dxDashboardControl1.State.Assign(DataModule1.mdLayoutsState);
116+
// Activate the dashboard control
117+
dxDashboardControl1.Active := True;
116118
end;
117119
```
118120
<!-- end-code-block -->
@@ -121,7 +123,13 @@ To load a different dashboard in the Dashboard Control, assign a new dashboard n
121123
The assigned layout definition replaces the current definition and resets the dashboard state.
122124

123125
You can also clear the Dashboard Control using [TdxCustomDashboardControl.Clear].
126+
Clearing a dashboard makes it inactive: `TdxCustomDashboardControl.Active = False`.
127+
Once you assign a new dashboard layout and, optionally, UI interaction state,
128+
you must activate the dashboard control.
124129

130+
```delphi
131+
dxDashboardControl1.Active := True;
132+
```
125133

126134
### Step 3: Display the Dashboard Designer
127135

0 commit comments

Comments
 (0)