Tab

GridViewDataColumn.UnboundExpression Property

Gets or sets an expression used to evaluate values for the current unbound column.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

Declaration

[DefaultValue("")]
public virtual string UnboundExpression { get; set; }
<DefaultValue("")>
Public Overridable Property UnboundExpression As String

Property Value

Type Default Description
String

String.Empty

An expression used to evaluate values for the current column.

Remarks

Set the GridViewDataColumn.UnboundType property to a specific data type to create an unbound column. Populate unbound columns in the designer or use the ASPxGridView.CustomUnboundColumnData event or the UnboundExpression property. The Expressions section describes the expression syntax.

Expressions do not allow you to save data entered by end users. For this purpose, use the ASPxGridView.CustomUnboundColumnData event to provide data for unbound fields.

Concept

Unbound Columns

Example

<dx:ASPxGridView ID="Grid" runat="server" DataSourceID="ProductsDataSource" KeyFieldName="OrderID" >
    <Columns>
        <dx:GridViewDataSpinEditColumn FieldName="UnitPrice" />
        <dx:GridViewDataSpinEditColumn FieldName="Quantity" />
        <dx:GridViewDataSpinEditColumn FieldName="Discount" />
        <dx:GridViewDataTextColumn FieldName="Total" UnboundType="Decimal" 
            UnboundExpression="UnitPrice*Quantity*(1-Discount)" />
    </Columns>
</dx:ASPxGridView>
See Also