Goal
Our application needs to allow end users to dynamically customize the Telerik Blazor DockManager at runtime by:
- Adding new panels
- Removing existing panels
- Rearranging and resizing panels
These changes should be fully user-driven and persisted so that:
- The layout is restored when the user returns
- The layout is consistent across browsers and devices
In short, we want the DockManager to behave as a customizable dashboard whose state can be reliably stored and reloaded from our database.
Problem
The current Telerik Blazor DockManager implementation requires panels to be declared in Razor markup (markup driven) and managed through an external data source.
This creates several challenges:
- The component state (DockState) is tightly coupled to the initial panel definitions.
- Dynamically adding or removing panels from the data source conflicts with the internal DockState.
- To synchronize changes, we must manually manipulate the DockState object using custom code.
- This manipulation relies on internal behavior that is not formally supported and may break in future Telerik releases.
As a result, implementing a truly dynamic and persistent DockManager layout requires complex workarounds that are fragile and difficult to maintain.
Feature Request
We propose enhancing the DockManager with first-class support for dynamic panel synchronization by introducing:
Two coordinated parameters:
- Data – the collection of panels
- DockState – the persisted layout information
Expected behavior:
- If the Data collection contains a panel that is not present in the DockState, the component should automatically:
- Add the new panel to the layout
- Place it at the end of the current structure (bottom or right, depending on layout)
- Update the DockState accordingly
- If the DockState contains a panel that is no longer present in the Data collection, the component should automatically:
- Remove that panel from the layout
- Update the DockState accordingly
This would allow developers to treat the DockManager as a true data-driven component, similar to other Telerik Blazor controls, without needing to manually modify internal state structures.