Back to Devexpress

ViewProperty.Property Property

xpo-devexpress-dot-xpo-dot-viewproperty-938f16f9.md

latest2.5 KB
Original Source

ViewProperty.Property Property

Gets or sets the expression used to filter rows, calculate the values in a column, or create an aggregate column.

Namespace : DevExpress.Xpo

Assembly : DevExpress.Xpo.v25.2.dll

NuGet Package : DevExpress.Xpo

Declaration

csharp
public CriteriaOperator Property { get; set; }
vb
Public Property [Property] As CriteriaOperator

Property Value

TypeDescription
CriteriaOperator

A CriteriaOperator descendant that contains the expression used to calculate the values in a column.

|

Remarks

When creating an expression, use the ViewProperty.Name property to refer to columns within a view. For more information, see the Creating Expression Columns in MSDN.

Example

The following example demonstrates how to populate the view’s XPView.Properties collection.

csharp
using DevExpress.Xpo;
// ...
xpView1.Properties.AddRange(new ViewProperty[] {
  new ViewProperty("Name", SortDirection.None, "[Name]", false, true),
  new ViewProperty("CompanyName", SortDirection.None, "[Customer.CompanyName]", false, true),
  new ViewProperty("Payment", SortDirection.None, "[Payments].Sum([Amount])", false, true),
  new ViewProperty("EmployeeFullName", SortDirection.None, "[Employee.FirstName] + ' ' + 
    [Employee.LastName]", false, true)});
vb
Imports DevExpress.Xpo
' ...
XpView1.Properties.AddRange(New ViewProperty() { _
  New ViewProperty("Name", SortDirection.None, "[Name]", False, True), _
  New ViewProperty("CompanyName", SortDirection.None, "[Customer.CompanyName]", False, _
    True), _
  New ViewProperty(("Payment", SortDirection.None, "[Payments].Sum([Amount])", False, _
    True), _
  New ViewProperty("EmployeeFullName", SortDirection.None, "[Employee.FirstName] + ' ' + _
    [Employee.LastName]", False, True)})

See Also

ViewProperty Class

ViewProperty Members

DevExpress.Xpo Namespace