Skip to main content
.NET Framework 4.6.2+

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.2.dll

Declaration

public DataViewProperty AddProperty(
    string name,
    Type valueType
)

Parameters

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.

Returns

Type Description
DataViewProperty

A DataViewProperty object that was added to the collection.

Remarks

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