Skip to content

Commit 8904c3e

Browse files
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 <dmitry.eliseev@devexpress.com>
1 parent 5dfb7b6 commit 8904c3e

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

Lines changed: 13 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,8 +123,18 @@ 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+
The `Clear` function disables the `TdxCustomDashboardControl.Active` property.
127+
Once you assign a new dashboard layout (and, optionally, a UI interaction state),
128+
you must activate the dashboard control.
124129

125130

131+
<!-- start-code-block -->
132+
#### Delphi
133+
```delphi
134+
dxDashboardControl1.Active := True;
135+
```
136+
<!-- end-code-block -->
137+
126138
### Step 3: Display the Dashboard Designer
127139

128140
Once you assign a dashboard layout definition to the Dashboard Control,

0 commit comments

Comments
 (0)