Skip to main content
.NET 6.0+

XPDataView.AddProperty(String, Type) Method

Creates a new DataViewProperty object with the specified name and type, and appends it to the XPDataView.Properties collection.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v24.1.dll


public DataViewProperty AddProperty(
    string name,
    Type valueType


Name Type Description
name String

A String value which specifies the column name. This value is assigned to the DataViewProperty.Name property.

valueType Type

A Type value which specifies the column’s type. This value is assigned to the DataViewProperty.ValueType property.


Type Description

A DataViewProperty object that was added to the collection.


Rather than adding individual columns to the collection via AddProperty, you can call the XPDataView.PopulateProperties or XPDataView.PopulatePropertiesOrdered method, to populate the collection with columns based on persistent properties of a specific object.

See Also