Table of Contents

Class XPServerCollectionSource

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

The data source for a DevExpress.XtraGrid.GridControl and DevExpress.XtraEditors.GridLookUpEdit controls that binds these controls to data in Server Mode.

public class XPServerCollectionSource : Component, IComponent, IDisposable, ISupportInitializeNotification, ISupportInitialize, IListSource, IXPClassInfoAndSessionProvider, IXPClassInfoProvider, ISessionProvider, IObjectLayerProvider, IDataLayerProvider, IXPDictionaryProvider, IColumnsServerActions, IDXCloneable
Inheritance
XPServerCollectionSource
Implements
IColumnsServerActions
IDXCloneable
Inherited Members

Constructors

XPServerCollectionSource()

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

public XPServerCollectionSource()

XPServerCollectionSource(Session, XPClassInfo)

Initializes a new instance of the XPServerCollectionSource class with a given Session and object type.

public XPServerCollectionSource(Session session, XPClassInfo objectClassInfo)

Parameters

session Session

The Session that will be used to load and save persistent objects. This value is used to initialize the XPServerCollectionSource.Session property.

objectClassInfo XPClassInfo

An XPClassInfo object that identifies the class describing the target data table. This value is used to initialize the XPServerCollectionSource.ObjectClassInfo property, and indirectly the XPServerCollectionSource.ObjectType property.

XPServerCollectionSource(Session, XPClassInfo, CriteriaOperator)

Initializes a new instance of the XPServerCollectionSource class with a given Session, object type and filter criteria.

public XPServerCollectionSource(Session session, XPClassInfo objectClassInfo, CriteriaOperator fixedFilterCriteria)

Parameters

session Session

The Session that will be used to load and save persistent objects. This value is used to initialize the XPServerCollectionSource.Session property.

objectClassInfo XPClassInfo

An XPClassInfo object that identifies the class describing the target data table. This value is used to initialize the XPServerCollectionSource.ObjectClassInfo property, and indirectly the XPServerCollectionSource.ObjectType property.

fixedFilterCriteria CriteriaOperator

A DevExpress.Data.Filtering.CriteriaOperator object that specifies a filter expression applied to data on the data store side. This value is assigned to the XPServerCollectionSource.FixedFilterCriteria property.

XPServerCollectionSource(Session, Type)

Initializes a new instance of the XPServerCollectionSource class with a given Session and object type.

public XPServerCollectionSource(Session session, Type objectType)

Parameters

session Session

The Session that will be used to load and save persistent objects. This value is used to initialize the XPServerCollectionSource.Session property.

objectType Type

The type of an object that describes the target data table. This value is used to initialize the XPServerCollectionSource.ObjectType property, and indirectly the XPServerCollectionSource.ObjectClassInfo property.

XPServerCollectionSource(Session, Type, CriteriaOperator)

Initializes a new instance of the XPServerCollectionSource class with a given Session, object type and filter criteria.

public XPServerCollectionSource(Session session, Type objectType, CriteriaOperator fixedFilterCriteria)

Parameters

session Session

The Session that will be used to load and save persistent objects. This value is used to initialize the XPServerCollectionSource.Session property.

objectType Type

The type of an object that describes the target data table. This value is used to initialize the XPServerCollectionSource.ObjectType property, and indirectly the XPServerCollectionSource.ObjectClassInfo property.

fixedFilterCriteria CriteriaOperator

A DevExpress.Data.Filtering.CriteriaOperator object that specifies a filter expression applied to data on the data store side. This value is assigned to the XPServerCollectionSource.FixedFilterCriteria property.

XPServerCollectionSource(IContainer)

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

public XPServerCollectionSource(IContainer container)

Parameters

container IContainer

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

Fields

IsInit

protected bool IsInit

Field Value

bool

Properties

AllowEdit

Gets or sets whether data editing is allowed.

public bool AllowEdit { get; set; }

Property Value

bool

true to allow data editing; otherwise, false.

AllowNew

Gets or sets whether new items can be added to a collection by a bound control.

public bool AllowNew { get; set; }

Property Value

bool

true to allow adding new items; otherwise, false.

AllowRemove

Gets or sets whether items can be removed from a collection by a bound control.

public bool AllowRemove { get; set; }

Property Value

bool

true to allow remove items; otherwise, false.

DefaultSorting

Specifies how data source contents are sorted by default, when sort order is not specified by the bound control.

public string DefaultSorting { get; set; }

Property Value

string

A string object which contains the names of the columns against which data source contents are sorted.

DeleteObjectOnRemove

Gets or sets whether the persistent object is deleted from the data store when it is removed from the collection.

public bool DeleteObjectOnRemove { get; set; }

Property Value

bool

true if the persistent object is deleted from the data store when it is removed from the collection; otherwise, false.

DisplayableProperties

Gets or sets properties that are available for binding in a bound data-aware control at design time.

public string DisplayableProperties { get; set; }

Property Value

string

The displayable properties list, containing property paths separated by semicolons. For example, “FirstName;LastName;Company.Name;Address.City”.

FixedFilterCriteria

Gets or sets the criteria used to filter objects on the data store side. These criteria are never affected by the data-aware control that is bound to the current XPServerCollectionSource object.

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

Property Value

CriteriaOperator

A DevExpress.Data.Filtering.CriteriaOperator object that specifies the criteria to filter objects on the data store side.

FixedFilterString

Gets or sets an expression in a string format, used to filter objects on the data store side. This filter is never affected by the data-aware control that is bound to the current XPServerCollectionSource object.

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

Property Value

string

A string that specifies the filter expression applied to data on the data server side.

IsDesignMode

protected bool IsDesignMode { get; }

Property Value

bool

ObjectClassInfo

Gets a XPClassInfo object that describes the target data table in the data store.

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

Property Value

XPClassInfo

An XPClassInfo object that describes the target data table in the data store.

ObjectType

Gets the type of the object that describes the target data table in the data store.

[Browsable(false)]
public Type ObjectType { get; set; }

Property Value

Type

The Type of the object that describes the target data table.

Session

Gets or sets the Session used by the current XPServerCollectionSource object.

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

Property Value

Session

The session with a connection to a data source. The default value is Session.DefaultSession.

TrackChanges

Gets or sets whether the XPServerCollectionSource tracks item changes.

public bool TrackChanges { get; set; }

Property Value

bool

true to raise the ListChange event after an item has been changed; otherwise, false.

Methods

CreateServerModeCore()

protected virtual IXpoServerModeGridDataSource CreateServerModeCore()

Returns

IXpoServerModeGridDataSource

DXClone()

protected virtual object DXClone()

Returns

object

DXCloneCreate()

protected virtual XPServerCollectionSource DXCloneCreate()

Returns

XPServerCollectionSource

EquipServerModeCore(IXpoServerModeGridDataSource)

protected virtual IXpoServerModeGridDataSource EquipServerModeCore(IXpoServerModeGridDataSource result)

Parameters

result IXpoServerModeGridDataSource

Returns

IXpoServerModeGridDataSource

FatalException(Exception)

protected virtual void FatalException(Exception e)

Parameters

e Exception

Inconsistent(ServerModeInconsistencyDetectedEventArgs)

protected virtual void Inconsistent(ServerModeInconsistencyDetectedEventArgs e)

Parameters

e ServerModeInconsistencyDetectedEventArgs

IsInitialized()

protected bool IsInitialized()

Returns

bool

OnResolveSession(ResolveSessionEventArgs)

protected virtual void OnResolveSession(ResolveSessionEventArgs args)

Parameters

args ResolveSessionEventArgs

OnServerExceptionThrown(ServerExceptionThrownEventArgs)

protected virtual void OnServerExceptionThrown(ServerExceptionThrownEventArgs e)

Parameters

e ServerExceptionThrownEventArgs

Reload()

Forces the bound data-aware control to reload data from the data store.

public void Reload()

Events

ResolveSession

Enables the XPServerCollectionSource to be associated with a session.

public event ResolveSessionEventHandler ResolveSession

Event Type

ResolveSessionEventHandler

ServerExceptionThrown

Fires when a data server throws an exception.

public event ServerExceptionThrownEventHandler ServerExceptionThrown

Event Type

ServerExceptionThrownEventHandler