New to Telerik UI for Blazor? Download Free 30-day trial

TaskBoard - State

  • EXAMPLE
  • VIEW SOURCE
Configurator

Manage State

Reorder columns or move cards, then Save State and Reload Page to see the board restored to the saved layout. Use Reset State to return to the default configuration.
Backlog

Create landing page for the upcoming campaign

Draft and schedule the monthly newsletter

To Do

Review advertising performance metrics

Update on-page SEO across the product blog

In Progress

Analyze conversion rates across all funnel stages

Synthesize feedback from recent user interviews

Done

Review the checkout and onboarding experience

Publish the updated content plan for Q3

  • State.razor
Loading the demo source code...please wait.
Style in ThemeBuilder
  • Custom SASS variables
  • Atomic customizations
  • Sharing projects
Start Theming

Description

The Telerik UI for Blazor TaskBoard exposes a state API that enables applications to capture and restore the board layout programmatically — including column display order and card positions within columns.

This demo showcases the State feature using GetState() and SetStateAsync(). Clicking Save State captures the current column order and card positions and persists them to browser localStorage. Clicking Reload Page navigates away and back, after which the board automatically restores the saved state on the first render. Load State restores a previously saved state without reloading, while Reset State clears the stored entry and reloads the page to return the board to its default configuration.

The TaskBoardState<TColumn> object returned by GetState() contains a list of TaskBoardColumnState entries (each with a column status key and display index) and a list of TaskBoardCardState entries (each with a card ID, column status, and position index). SetStateAsync() uses the status key to match saved column entries to live data and the card ID to match card entries, restoring display order without replacing the underlying data.

For cross-session persistence, serialize the state object to JSON before saving and deserialize it when loading. The column and card data must always be provided through ColumnData and CardData — state stores ordering information only.

This Blazor TaskBoard State example is part of a unique collection of hundreds of Blazor demos, with which you can see all Telerik UI for Blazor components and their features in action. View the source code of the demos from the library or directly adapt, and edit them and their theme appearance in Telerik REPL for Blazor or ThemeBuilder.

Support & Learning Resources

An error has occurred. This application may no longer respond until reloaded.