Skip to main content
All docs

DashboardObjectDataSource.DataId Property

Gets or sets the unique identifier of an Object data source.

Namespace: DevExpress.DashboardCommon

Assembly: DevExpress.Dashboard.v22.1.Core.dll


public string DataId { get; set; }

Property Value

Type Default Description


An Object data source’s identifier.


Use the DataId property to identify the data source for which the DataLoading event is raised.

This example shows how to bind the ASP.NET MVC Dashboard extension to the Object Data Source and use the DashboardConfigurator.DataLoading event to supply the data source with data:

using System.Web.Routing;
using DevExpress.DashboardWeb;
using DevExpress.DashboardWeb.Mvc;
using DevExpress.DashboardCommon;

namespace DashboardMVC {
    public static class DashboardConfig {
        public static void RegisterService(RouteCollection routes) {

            DashboardFileStorage dashboardFileStorage = new DashboardFileStorage("~/App_Data/Dashboards");
            DataSourceInMemoryStorage dataSourceStorage = new DataSourceInMemoryStorage();
             // Registers an Object data source.
            DashboardObjectDataSource objDataSource = new DashboardObjectDataSource("Object Data Source");
            objDataSource.DataId = "Object Data Source ID";
            dataSourceStorage.RegisterDataSource("objDataSource", objDataSource.SaveToXml());
            DashboardConfigurator.Default.DataLoading += DataLoading;
         private static void DataLoading(object sender, DataLoadingWebEventArgs e) {
            if(e.DataId == "Object Data Source ID") {
                e.Data = Invoices.CreateData();

The following code snippets (auto-collected from DevExpress Examples) contain references to the DataId property.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also