如何获得devexpress pivotgrid的Grandtotal值?

时间:2013-01-17 15:16:49

标签: wpf vb.net xaml devexpress

如何使用vb.net从Devexpress pivotgrid获取Grandtotal值?

Dim dsAccountingCube As New DevExpress.XtraPivotGrid.PivotGridAdomdDataSource
dsAccountingCube.ConnectionString = m_strOLAPConnection

m_pgCircularGauge.DataSource = dsAccountingCube

m_pgCircularGauge.BeginUpdate()
m_pgCircularGauge.RetrieveFields()

For Each f In m_pgCircularGauge.Fields
    Select Case f.Name
        Case "fieldBalance1122"
            f.Caption = "$"
            f.Area = DevExpress.Xpf.PivotGrid.FieldArea.DataArea

        Case Else
            f.Visible = False
        End Select
Next

我想将grandtotal值分配给Circulargauge的针值。如下

Me.CircularGaugeControl1.Scales(0).Needles(0).Value = m_pgCircularGauge.GetCellValue(0, 0)

1 个答案:

答案 0 :(得分:0)

我使用了PivotGridControl中的GetCellValue属性。

m_pgCircularGauge.GetCellValue(0, 0)

它对我有用。