Back to Devexpress

GridColumnDataEventArgs.Item Property

mobilecontrols-devexpress-dot-xamarinforms-dot-datagrid-dot-gridcolumndataeventargs-84cf0aef.md

latest2.7 KB
Original Source

GridColumnDataEventArgs.Item Property

Gets an object that represents a record in the grid’s underlying data source.

Namespace : DevExpress.XamarinForms.DataGrid

Assembly : DevExpress.XamarinForms.Grid.dll

NuGet Package : DevExpress.XamarinForms.Grid

Declaration

csharp
public object Item { get; }

Property Value

TypeDescription
Object

An object that represents a data source record.

|

Remarks

Use the Item property to access required data values of the processed row when you handle the DataGridView.CustomUnboundColumnData event to supply data for an unbound column. The RowHandle property returns the processed row handle.

If the DataGridView.CustomUnboundColumnData event is raised when an unbound column’s value is modified in the grid (GridColumnDataEventArgs.IsSetData is true ), you can change any field’s value based on the modified value of the unbound column. To do this, specify properties of an object that the Item property returns or call the DataGridView.GetCellValue method.

Example

Assume that the DataGridView instance is bound to a collection of orders. An order has the Product.Name, Product.UnitPrice and Quantity fields. This example shows how to add an unbound column (Total) to the grid to calculate each order amount according to the expression: UnitPrice*Quantity.

Implement logic to calculate column values in one of the following ways:

See Also

GridColumnDataEventArgs Class

GridColumnDataEventArgs Members

DevExpress.XamarinForms.DataGrid Namespace