You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: knowledge-base/dockmanager-reset-state.md
+6-8Lines changed: 6 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ type: how-to
5
5
page_title: How to Reset DockManager State Dynamically in Blazor
6
6
meta_title: Reset DockManager State Dynamically in Blazor
7
7
slug: dockmanager-kb-reset-state
8
-
tags: dockmanager, blazor, state, reset
8
+
tags: dockmanager, blazor, state
9
9
res_type: kb
10
10
ticketid: 1691957
11
11
---
@@ -22,7 +22,7 @@ ticketid: 1691957
22
22
23
23
## Description
24
24
25
-
I want to reset the state of the [DockManager](slug:dockmanager-overview) component on a button click. The DockManager currently only resets by reloading the page. I need a solution to reset its state dynamically.
25
+
I want to reset the [DockManager state](slug:dockmanager-state) on a button click. The DockManager currently only resets by reloading the page. I need a solution to reset its state dynamically.
26
26
27
27
This knowledge base article also answers the following questions:
28
28
- How to reset DockManager layout to its default state?
@@ -33,16 +33,14 @@ This knowledge base article also answers the following questions:
33
33
34
34
To reset the DockManager state dynamically on a button click:
35
35
36
-
1. Capture the Default State After Initial Render—Save the default state when the DockManager is first rendered using the [`OnAfterRenderAsync`](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.components.componentbase.onafterrenderasync?view=aspnetcore-9.0) lifecycle method
36
+
1. Capture and save the default DockManager state in the [`OnAfterRenderAsync`](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.components.componentbase.onafterrenderasync?view=aspnetcore-9.0) lifecycle method.
37
37
38
-
2.Reset the State on Button Click—Restore the previously saved state when the button is clicked.
38
+
2. Restore the previously saved default state when the button is clicked.
39
39
40
40
>caption Reset the DockManager layout to its default state
41
41
42
42
````RAZOR
43
-
<strong>Change something in the DockManager (move, resize, or close panes), then click the button to restore the state</strong>
44
-
<br />
45
-
<br />
43
+
Change something in the DockManager (move, resize, or close panes). Тhen click
46
44
<TelerikButton OnClick="@ResetDockState" ThemeColor="@ThemeConstants.Button.ThemeColor.Primary">Reset Dock State</TelerikButton>
47
45
<TelerikDockManager @ref="@DockManagerRef"
48
46
Height="600px">
@@ -133,4 +131,4 @@ To reset the DockManager state dynamically on a button click:
0 commit comments