Back to Devexpress

PivotGridControl.GetCellValue(Object[], Object[]) Method

wpf-devexpress-dot-xpf-dot-pivotgrid-dot-pivotgridcontrol-dot-getcellvalue-x28-system-dot-object-system-dot-object-x29.md

latest2.8 KB
Original Source

PivotGridControl.GetCellValue(Object[], Object[]) Method

Returns a cell value calculated for the specified column and row field values.

Namespace : DevExpress.Xpf.PivotGrid

Assembly : DevExpress.Xpf.PivotGrid.v25.2.dll

NuGet Package : DevExpress.Wpf.PivotGrid

Declaration

csharp
public object GetCellValue(
    object[] columnValues,
    object[] rowValues
)
vb
Public Function GetCellValue(
    columnValues As Object(),
    rowValues As Object()
) As Object

Parameters

NameTypeDescription
columnValuesObject[]

An array of column field values that identify the column where the cell resides.

| | rowValues | Object[] |

An array of row field values that identify the row where the cell resides.

|

Returns

TypeDescription
Object

A summary value calculated for the specified column and row field values.

|

Remarks

Consider the pivot grid displayed in the image below.

The following table illustrates how to use the GetCellValue method to obtain specific cell values.

CellC#Visual Basic
RedpivotGridControl.GetCellValue(new object[] {1996, 1}, new object[] {"Alice Mutton"});pivotGridControl.GetCellValue(New Object() {1996, 1}, New Object() {"Alice Mutton"})
GreenpivotGridControl.GetCellValue(new object[] {1996}, new object[] {"Aniseed Syrup"});pivotGridControl.GetCellValue(New Object() {1996}, New Object() {"Aniseed Syrup"})
BluepivotGridControl.GetCellValue(null, new object[] {"Boston Crab Meat"});pivotGridControl.GetCellValue(Nothing, New Object() {"Boston Crab Meat"})

Note

If there are two or more data fields, an exception is raised by this overload of the GetCellValue method. To retrieve cell values when there is more than one data field, use the GetCellValue method overload that takes a dataField parameter.

See Also

PivotGridControl Class

PivotGridControl Members

DevExpress.Xpf.PivotGrid Namespace