Back to Devexpress

ASPxPivotGrid.CustomChartDataSourceRows Event

aspnet-devexpress-dot-web-dot-aspxpivotgrid-dot-aspxpivotgrid-054fa607.md

latest6.0 KB
Original Source

ASPxPivotGrid.CustomChartDataSourceRows Event

Allows you to customize pivot grid data before passing it to a chart control.

Namespace : DevExpress.Web.ASPxPivotGrid

Assembly : DevExpress.Web.ASPxPivotGrid.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public event PivotCustomChartDataSourceRowsEventHandler CustomChartDataSourceRows
vb
Public Event CustomChartDataSourceRows As PivotCustomChartDataSourceRowsEventHandler

Event Data

The CustomChartDataSourceRows event's data class is PivotCustomChartDataSourceRowsEventArgs. The following properties provide information specific to this event:

PropertyDescription
RowsGets the collection of chart datasource rows.

The event data class exposes the following methods:

MethodDescription
CreateRow(Object, Object, Object)Creates a PivotChartDataSourceRow instance that specifies a chart’s series point with the specified argument, series and value.

Remarks

The CustomChartDataSourceRows event occurs before ASPxPivotGrid passes its data to a bound chart control.

Use the event parameter’s PivotCustomChartDataSourceRowsEventArgs.Rows property to access data that will be passed to the chart.

This collection contains PivotChartDataSourceRow objects that identify chart datasource records. Each record contains data from a specific pivot grid cell and will be represented by a series point in a chart.

Use the following properties, exposed by the PivotChartDataSourceRow objects, to obtain and modify the point’s argument, series and value.

|

PivotChartDataSourceRowBase.Argument

|

Gets or sets the argument of a chart point that will represent the current datasource row.

| |

PivotChartDataSourceRowBase.Series

|

Gets or sets the series of a chart point that will represent the current datasource row.

| |

PivotChartDataSourceRowBase.Value

|

Gets or sets the value of a chart point that will represent the current datasource row.

|

For each record, you can also obtain information about a pivot grid cell to which this record corresponds. To do this, use the following properties.

|

PivotChartDataSourceRow.CellInfo

|

Gets information about a pivot grid cell that corresponds to the current datasource row.

| |

PivotChartDataSourceRow.ColumnValueInfo

|

Gets information about the column field value that corresponds to the current datasource row.

| |

PivotChartDataSourceRow.RowValueInfo

|

Gets information about the row field value that corresponds to the current datasource row.

|

Use the PivotCustomChartDataSourceRowsEventArgs.CreateRow method to create PivotChartDataSourceRow instances. You can then add them to the PivotCustomChartDataSourceRowsEventArgs.Rows collection using its Add and Insert methods.

See Also

CustomChartDataSourceData

Integrate ASPxPivotGrid with the Chart Control

ASPxPivotGrid Class

ASPxPivotGrid Members

DevExpress.Web.ASPxPivotGrid Namespace