Back to Devexpress

DashboardXpoDataSource Class

dashboard-devexpress-dot-dashboardcommon-8fda9d6e.md

latest3.7 KB
Original Source

DashboardXpoDataSource Class

Retrieves data from XPO (eXpress Persistent Objects).

Namespace : DevExpress.DashboardCommon

Assembly : DevExpress.Dashboard.v25.2.Core.dll

NuGet Package : DevExpress.Dashboard.Core

Declaration

csharp
public class DashboardXpoDataSource :
    XPObjectSource,
    IDashboardDataSource,
    IDashboardComponent,
    IComponent,
    IDisposable,
    ISupportInitialize,
    ISupportPrefix,
    IDashboardDataSourceInternal,
    IExternalSchemaConsumer,
    IFederationDataProvider,
    IXpoDataSourceInfo,
    ICloneable<DashboardXpoDataSource>
vb
Public Class DashboardXpoDataSource
    Inherits XPObjectSource
    Implements IDashboardDataSource,
               IDashboardComponent,
               IComponent,
               IDisposable,
               ISupportInitialize,
               ISupportPrefix,
               IDashboardDataSourceInternal,
               IExternalSchemaConsumer,
               IFederationDataProvider,
               IXpoDataSourceInfo,
               ICloneable(Of DashboardXpoDataSource)

Remarks

The DashboardXpoDataSource allows you to obtain data that XPO (eXpress Persistent Object) retrieves from a data source.

Runtime

  1. Create a DashboardXpoDataSource object and use the ConnectionStringName property to specify the name of the connection string defined in the application configuration file.

  2. Pass the persistent object type to the SetEntityType method.

The code sample below illustrates how to connect to the XPO data source.

csharp
using DevExpress.DashboardCommon;
// ...
public static DashboardXpoDataSource CreateXpoDataSource()
{
    DashboardXpoDataSource dataSource = new DashboardXpoDataSource()
    {
        ConnectionStringName = "northwind"
    };
    dataSource.SetEntityType(typeof(nwind.Customers));
    return dataSource;
}
vb
Imports DevExpress.DashboardCommon
' ...
Public Shared Function CreateXpoDataSource() As DashboardXpoDataSource
  Dim dataSource As New DashboardXpoDataSource() With {.ConnectionStringName = "northwind"}
  dataSource.SetEntityType(GetType(nwind.Customers))
  Return dataSource
End Function

Design Time

Refer to the following topic for information on how bind a Dashboard to an XPO Data Source at Design-Time: XPO Data Source

Implements

IDataComponent

IDashboardDataSource

Inheritance

Object MarshalByRefObject Component DataComponentBase XPObjectSource DashboardXpoDataSource

See Also

DashboardXpoDataSource Members

DevExpress.DashboardCommon Namespace