Skip to main content
A newer version of this page is available. .
Tab

GridViewDataColumn.UnboundExpression Property

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

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v19.1.dll

Declaration

[DefaultValue("")]
public virtual string UnboundExpression { get; set; }

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