Skip to main content
A newer version of this page is available. .

PivotGridAdomdDataSource Class

An ADOMD.NET datasource.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.PivotGrid.v19.2.Core.dll

Declaration

public class PivotGridAdomdDataSource :
    OLAPDataSourceBase

Remarks

The PivotGridAdomdDataSource class is obsolete. To bind a pivot grid to an OLAP cube via the ADOMD.NET data provider, set the pivot grid’s OLAPDataProvider property to Adomd and assign the connection string to the OLAPConnectionString property (see the example below).

To learn more, see Binding to OLAP Data Sources.

Note

When binding to local cubes, use either the OLE DB or ADOMD.NET provider, but not both. After you have established a connection using one of the providers, the other becomes unavailable in the current process. For instance, if you try to connect to a local cube via an OLE DB, disconnect and then connect again via ADOMD.NET to the same or another cube file from the same process, an exception will be thrown.

Example

The following example demonstrates how to bind a PivotGridControl to an OLAP cube via the ADOMD.NET data provider.

In this example, the PivotGridControl.OLAPDataProvider property is used to specify that the Pivot Grid Control should use the ADOMD.NET data provider to access an OLAP cube. OLAP connection parameters are specified in a connection string passed to the PivotGridControl.OLAPConnectionString property. The following parameters are provided:

  • Data Source - a path to a local cube file that will serve as a datasource.
  • Initial Catalog - a data catalog that contains cubes.
  • Cube Name - the name of the cube that provides OLAP data.
using System;
using System.Windows.Forms;
using DevExpress.XtraPivotGrid;

namespace XtraPivotGrid_ADOMD {
    public partial class Form1 : Form {
        public Form1() {
            InitializeComponent();
        }
        void Form1_Load(object sender, EventArgs e) {

            // Specifies that PivotGridControl should use the ADOMD.NET data provider
            // to bind to an OLAP cube.
            pivotGridControl1.OLAPDataProvider = OLAPDataProvider.Adomd;

            // Configures a data connection.
            // Specifies a string that encapsulates connection parameters 
            // required to access the desired OLAP cube.
            pivotGridControl1.OLAPConnectionString =
                "Data Source=http://demos.devexpress.com/Services/OLAP/msmdpump.dll;" +
                "Initial Catalog=Adventure Works DW Standard Edition;Cube Name=Adventure Works;";
        }
    }
}

Inheritance

Object
DevExpress.PivotGrid.QueryMode.QueryDataSource<DevExpress.PivotGrid.OLAP.OLAPCubeColumn>
OLAPDataSourceBase
PivotGridAdomdDataSource
See Also