mobilecontrols-devexpress-dot-xamarinforms-dot-datagrid-dot-gridcolumn.md
Gets or sets an expression used to calculate values for the unbound column.
Namespace : DevExpress.XamarinForms.DataGrid
Assembly : DevExpress.XamarinForms.Grid.dll
NuGet Package : DevExpress.XamarinForms.Grid
[XtraSerializableProperty]
public string UnboundExpression { get; set; }
| Type | Description |
|---|---|
| String |
An expression used to calculate cell values for the current column.
|
In addition to columns that obtain their data from related data source fields, DataGridView allows you to create unbound columns that are not bound to any fields of the underlying data source and display custom (calculated) data values.
To add an unbound column to the grid, do the following.
To populate an unbound column with data, do one of the following.
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:
Use the GridColumn.UnboundExpression property:
Handle the DataGridView.CustomUnboundColumnData event:
See Also