Table of Contents

Class XPDataView

Namespace
DevExpress.Xpo
Assembly
DevExpress.Xpo.v24.1.dll

The data source that displays data from result sets.

public class XPDataView : Component, IComponent, IDisposable, ISupportInitialize, IBindingList, IList, ICollection, IEnumerable, ITypedList, IFilteredXtraBindingList, IFilteredDataSource, IXPDictionaryProvider
Inheritance
XPDataView
Implements
IFilteredXtraBindingList
IFilteredDataSource
Inherited Members

Constructors

XPDataView()

Initializes a new instance of the XPDataView class with the default settings.

public XPDataView()

XPDataView(XPDictionary)

Initializes a new instance of the XPDataView class with the specified metadata provider.

public XPDataView(XPDictionary dictionary)

Parameters

dictionary XPDictionary

An XPDictionary object which represents the metadata provider. This value is assigned to the XPDataView.Dictionary property.

XPDataView(XPDictionary, XPClassInfo)

Initializes a new instance of the XPDataView class, and populates it with columns based on the specified settings.

public XPDataView(XPDictionary dictionary, XPClassInfo classInfo)

Parameters

dictionary XPDictionary

An XPDictionary object which represents the metadata provider. This value is assigned to the XPDataView.Dictionary property.

classInfo XPClassInfo

An XPClassInfo object containing metadata information on the object whose persistent properties provide metadata information to populate the XPDataView.Properties collection.

XPDataView(XPDictionary, XPClassInfo, SelectedData)

Initializes a new instance of the XPDataView class, populates it with columns and loads data based on the specified settings.

public XPDataView(XPDictionary dictionary, XPClassInfo classInfo, SelectedData data)

Parameters

dictionary XPDictionary

An XPDictionary object which represents the metadata provider. This value is assigned to the XPDataView.Dictionary property.

classInfo XPClassInfo

An XPClassInfo object containing metadata information on the object whose persistent properties provide metadata information to populate the XPDataView.Properties collection.

data SelectedData

An DevExpress.Xpo.DB.SelectedData object which represents a result set providing data to be loaded into the data view.

XPDataView(XPDictionary, XPClassInfo, LoadDataMemberOrderItem[], SelectedData)

Initializes a new instance of the XPDataView class, populates it with columns and loads data based on the specified settings.

public XPDataView(XPDictionary dictionary, XPClassInfo classInfo, LoadDataMemberOrderItem[] members, SelectedData data)

Parameters

dictionary XPDictionary

An XPDictionary object which represents the metadata provider. This value is assigned to the XPDataView.Dictionary property.

classInfo XPClassInfo

An XPClassInfo object containing metadata information on the object whose persistent properties provide metadata information to populate the XPDataView.Properties collection.

members LoadDataMemberOrderItem[]

An array of LoadDataMemberOrderItem objects which provide mapping information.

data SelectedData

An DevExpress.Xpo.DB.SelectedData object which represents a result set providing data to be loaded into the data view.

XPDataView(XPDictionary, XPClassInfo, params string[])

Initializes a new instance of the XPDataView class and populates it with columns based on the specified settings.

public XPDataView(XPDictionary dictionary, XPClassInfo classInfo, params string[] members)

Parameters

dictionary XPDictionary

An XPDictionary object which represents the metadata provider. This value is assigned to the XPDataView.Dictionary property.

classInfo XPClassInfo

An XPClassInfo object containing metadata information on the object whose members are used to populate the XPDataView.Properties collection.

members string[]

An array of property names that are used to populate the XPDataView.Properties collection.

XPDataView(XPDictionary, IList<string>, IList<Type>)

Initializes a new instance of the XPDataView class, and creates columns based on the specified settings.

public XPDataView(XPDictionary dictionary, IList<string> names, IList<Type> types)

Parameters

dictionary XPDictionary

An XPDictionary object which represents the metadata provider. This value is assigned to the XPDataView.Dictionary property.

names IList<string>

A list of names for columns to be created and added to the XPDataView.Properties collection.

types IList<Type>

A list of types for columns to be created and added to the XPDataView.Properties collection.

XPDataView(XPDictionary, List<XPMemberInfo>)

Initializes a new instance of the XPDataView class and populates it with columns based on the specified settings.

public XPDataView(XPDictionary dictionary, List<XPMemberInfo> memberInfoList)

Parameters

dictionary XPDictionary

An XPDictionary object which represents the metadata provider. This value is assigned to the XPDataView.Dictionary property.

memberInfoList List<XPMemberInfo>

A list of XPMemberInfo objects identifying persistent properties that are used to populate the XPDataView.Properties collection.

XPDataView(IContainer)

Initializes a new instance of the XPDataView class and adds it to a form’s container.

public XPDataView(IContainer container)

Parameters

container IContainer

An IContainer object, which is the owner container of the created XPDataView instance.

Properties

CaseSensitive

Gets or sets whether string comparisons evaluated by the XPDataView on the client are case-sensitive.

public bool CaseSensitive { get; set; }

Property Value

bool

true if string comparisons are case-sensitive; otherwise, false.

Count

Gets the number of records within the data view.

[Browsable(false)]
public int Count { get; }

Property Value

int

An integer value which specifies the number of records within the data view.

Dictionary

Gets or sets the metadata provider used to filter and sort data using custom function operators.

[Browsable(false)]
public XPDictionary Dictionary { get; set; }

Property Value

XPDictionary

An XPDictionary object which provides support for custom function operators used to filter and sort data displayed in the data view.

Filter

Gets or sets the criteria used to perform client-side filtering of data view rows.

[TypeConverter("DevExpress.Xpo.Design.CriteriaConverter, DevExpress.Xpo.v24.1.Design, Version=24.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a")]
public CriteriaOperator Filter { get; set; }

Property Value

CriteriaOperator

A DevExpress.Data.Filtering.CriteriaOperator object which specifies the criteria used to filter data view rows.

FilterString

Gets or sets the string representation of the criteria used to perform client-side filtering of data view rows.

[Browsable(false)]
public string FilterString { get; set; }

Property Value

string

A string representation of a DevExpress.Data.Filtering.CriteriaOperator object which specifies the filtering criteria.

IsDesignMode

protected bool IsDesignMode { get; }

Property Value

bool

this[int]

Provides indexed access to individual records within the data view.

public DataViewRecord this[int index] { get; }

Parameters

index int

A zero-based integer which specifies the record’s position within the data view. If it’s negative or exceeds the last available index, an exception is thrown.

Property Value

DataViewRecord

A DataViewRecord object which represents the record at the specified position.

Properties

Provides access to the data view’s columns.

public DataViewPropertiesCollection Properties { get; }

Property Value

DataViewPropertiesCollection

A DataViewPropertiesCollection object representing a collection of data view columns.

Sorting

Provides access to the collection whose elements specify sorting options for the data view.

public SortingCollection Sorting { get; set; }

Property Value

SortingCollection

A SortingCollection object which contains information on the columns used in data view sorting.

Methods

AddProperty(string, Type)

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

public DataViewProperty AddProperty(string name, Type valueType)

Parameters

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

DataViewProperty

A DataViewProperty object that was added to the collection.

GetTargetResultSet(SelectedData)

public static SelectStatementResult GetTargetResultSet(SelectedData data)

Parameters

data SelectedData

Returns

SelectStatementResult

LoadData(SelectedData)

Loads data from the specified result set to the data view.

public void LoadData(SelectedData data)

Parameters

data SelectedData

An DevExpress.Xpo.DB.SelectedData object which represents a result set, providing data to be loaded into the data view.

LoadOrderedData(LoadDataMemberOrderItem[], SelectedData)

Loads data from the specified result set to the data view, mapping data view columns to result set columns.

public void LoadOrderedData(LoadDataMemberOrderItem[] members, SelectedData data)

Parameters

members LoadDataMemberOrderItem[]

An array of LoadDataMemberOrderItem objects which provide mapping information.

data SelectedData

An DevExpress.Xpo.DB.SelectedData object which represents a result set providing data to be loaded into the data view.

PopulateProperties(XPClassInfo)

Populates the data view with columns based on the specified metadata information.

public void PopulateProperties(XPClassInfo classInfo)

Parameters

classInfo XPClassInfo

An XPClassInfo object containing metadata information on the object whose persistent properties are used to populate the XPDataView.Properties collection.

PopulateProperties(XPClassInfo, params string[])

Populates the data view with columns based on the specified metadata information.

public void PopulateProperties(XPClassInfo classInfo, params string[] members)

Parameters

classInfo XPClassInfo

An XPClassInfo object containing metadata information on the object whose persistent properties are used to populate the XPDataView.Properties collection.

members string[]

An array of property names that are used to populate the XPDataView.Properties collection.

PopulateProperties(List<XPMemberInfo>)

Populates the data view with columns based on the specified metadata information.

public void PopulateProperties(List<XPMemberInfo> memberInfoList)

Parameters

memberInfoList List<XPMemberInfo>

A list of XPMemberInfo objects identifying persistent properties that are used to populate the XPDataView.Properties collection.

PopulatePropertiesOrdered(XPClassInfo, LoadDataMemberOrderItem[])

Populates the data view with columns based on the specified metadata and mapping information.

public void PopulatePropertiesOrdered(XPClassInfo classInfo, LoadDataMemberOrderItem[] members)

Parameters

classInfo XPClassInfo

An XPClassInfo object containing metadata information on the object whose persistent properties are used to populate the XPDataView.Properties collection.

members LoadDataMemberOrderItem[]

An array of LoadDataMemberOrderItem objects which provide mapping information.

Events

ListChanged

Occurs when the data view’s settings are changed.

public event ListChangedEventHandler ListChanged

Event Type

ListChangedEventHandler