Storing widget data
Describes the way to store the widget data in the database.
This article decribes how the widget data is stored in the database. Since Litium 7.4, Dashboard has been rewritten to eliminate WebForms, improve the performance as well as reliability. This tutorial consists both for versions before Litium 7.4 and from-after Litium 7.4.
The widget data is stored in the Common.Setting table. Each user will have one row with the key "widgetsconfiguration" storing whole widget data in JSON.

Below is an example for the widget data in JSON
{
"$type":"Litium.Web.Administration.Dashboard.WidgetsConfigurationByUser, Litium.Web.Administration.Application",
"widgets":
[
{
"systemId":"7bba32ac-dc2b-4fdb-b28a-98e5b201fd41",
"widgetTypeId":"RssFeedReaderWidgetDefinition",
"settings":
{
"$type":"Litium.Web.Administration.Dashboard.Widgets.RssFeedReader.RssFeedReaderWidgetDefinition+SettingsModel, Litium.Web.Administration.Application",
"name":"RSS Feed",
"url":"https://docs.litium.com/links/dashboard/news-rss",
"maxNumberOfItems":10,
"showImages":true,
"showUrl":true
},
"zoneId":1
},
{
"systemId":"5369525d-bf74-491a-bba6-5f2b18cafd56",
"widgetTypeId":"MyTasksWidgetDefinition",
"settings":
{
"$type":"Litium.Web.Administration.Dashboard.Widgets.MyTasks.MyTasksWidgetDefinition+SettingsModel, Litium.Web.Administration.Application",
"name":"My Tasks",
"channel":"38174d7c-b407-4925-b9e4-159e4bc0a357",
"numberOfDrafts":5,
"numberOfPublishedPages":5,
"numberOfProducts":5
},
"zoneId":2
}
]
}
NOTE: when upgrading to Litium 7.4, the data migration only supports for the built-in widget types. It means that the widget data of custom widget types must be migrated manually.
There are two tables to store the widget data.
- The Dashboard_LayoutState table stores the data of the widget layout for each user.

- The Dashboard_WidgetInfo table stores the data of the settings for each widget.
