A newer version of this page is available. Switch to the current version.

DataViewExpression Class

Specifies a data view column name and expression used to compute the column value.

Namespace: DevExpress.ExpressApp.Utils

Assembly: DevExpress.ExpressApp.v18.2.dll


public class DataViewExpression
Public Class DataViewExpression

Related API Members

The following members accept/return DataViewExpression objects:


Use this class when it is required to create a list of data records retrieved from a database without loading complete business classes (a data view). Values in each data record can be obtained from specific business class properties directly, or be evaluated by the database server using complex expressions. The IList<DataViewExpression> list can be passed to the IObjectSpace.CreateDataView method, XafDataView constructor or XafDataView.Expressions property.

List<DataViewExpression> dataViewExpressions = new List<DataViewExpression>();
    new DataViewExpression("ID", new OperandProperty("ID")));
dataViewExpressions.Add(new DataViewExpression(
    "Name.UpperCase", new FunctionOperator(FunctionOperatorType.Upper, new OperandProperty("Name"))));
dataViewExpressions.Add(new DataViewExpression(
    "Count", new AggregateOperand("Sales", Aggregate.Count)));
var dataView = objectSpace.CreateDataView(typeof(Sale), dataViewExpressions, null, null);


See Also