Enables providing data to unbound fields.
NuGet Package: DevExpress.Web
public event CustomFieldDataEventHandler CustomUnboundFieldData
Public Event CustomUnboundFieldData As CustomFieldDataEventHandler
The CustomUnboundFieldData event's data class is CustomFieldDataEventArgs. The following properties provide information specific to this event:
|Field||Gets the field being processed. Inherited from PivotFieldEventArgsBase<T>.|
|ListSourceRowIndex||Gets the current row’s index in the data source.|
|Value||Sets the cell’s value.|
The event data class exposes the following methods:
|GetListSourceColumnValue(Int32, String)||Gets the specified field’s value in the specified row in the control’s underlying data source.|
|GetListSourceColumnValue(String)||Gets the specified cell’s value within the current row in the control’s underlying data source.|
The CustomUnboundFieldData event is only fired for unbound fields. To create an unbound field, add a PivotGridField object to the ASPxPivotGrid.Fields collection and set its PivotGridFieldBase.UnboundType property to an appropriate value according to the type of data the field is supposed to display. The field’s PivotGridField.FieldName property must be set to a unique value. This value must not refer to any field in the control’s underlying data source.
The CustomUnboundFieldData event is raised for each row and for each unbound field in the data source. The currently processed row is identified by the CustomFieldDataEventArgs.ListSourceRowIndex property. This property specifies the row’s index in the data source. The processed unbound field is identified by the PivotFieldEventArgsBase<T>.Field property. To provide data for a cell, assign a value to the CustomFieldDataEventArgs.Value property.
For an example on how to use unbound fields, see “Unbound Fields” in the ASPxPivotGrid Demo.
To learn more about unbound fields, see Unbound Data.