Back to Devexpress

XPDataView.AddProperty(String, Type) Method

xpo-devexpress-dot-xpo-dot-xpdataview-dot-addproperty-x28-system-dot-string-system-dot-type-x29.md

latest2.5 KB
Original Source

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

NuGet Package : DevExpress.Xpo

Declaration

csharp
public DataViewProperty AddProperty(
    string name,
    Type valueType
)
vb
Public Function AddProperty(
    name As String,
    valueType As Type
) As DataViewProperty

Parameters

NameTypeDescription
nameString

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

TypeDescription
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

Add

XPDataView Class

XPDataView Members

DevExpress.Xpo Namespace