The following example shows how to display KPI graphics in the ASPxPivotGrid control bound to a regular data source.
The ASPxPivotGrid control is bound to a "Sales Person" view in the Northwind database. To display KPI graphics, we create an unbound field whose values correspond to images contained within a KPI graphic set.
In this example the unbound field values depend on the "Extended Price" field's values: if "Extended Price" field's value is less then 100000, the unbound field value is "-1", if "Extended Price" field's value is less then 150000, the unbound field value is "0", in other cases the unbound field value is "1".
The DataFieldUnboundExpressionMode property is set to DataFieldUnboundExpressionMode.UseSummaryValues to calculate unbound expressions for data fields against summary values. The KPIGraphic property specifies a graphic set used to visualize unbound field values.
The ASPxPivotGrid control is bound to a "Sales Person" view in the Northwind database. To display KPI graphics, we create an unbound field whose values correspond to images contained within a KPI graphic set.
In this example the unbound field values depend on the "Extended Price" field's values: if "Extended Price" field's value is less then 100000, the unbound field value is "-1", if "Extended Price" field's value is less then 150000, the unbound field value is "0", in other cases the unbound field value is "1".
The DataFieldUnboundExpressionMode property is set to DataFieldUnboundExpressionMode.UseSummaryValues to calculate unbound expressions for data fields against summary values. The KPIGraphic property specifies a graphic set used to visualize unbound field values.