.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

XafApplication.CreateCollectionSource(IObjectSpace, Type, String) Method

Creates a collection source for a specified List View.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v19.2.dll

Declaration

public CollectionSourceBase CreateCollectionSource(
    IObjectSpace objectSpace,
    Type objectType,
    string listViewId
)
Public Function CreateCollectionSource(
    objectSpace As IObjectSpace,
    objectType As Type,
    listViewId As String
) As CollectionSourceBase
public CollectionSourceBase CreateCollectionSource(
    IObjectSpace objectSpace,
    Type objectType,
    string listViewId
)
Public Function CreateCollectionSource(
    objectSpace As IObjectSpace,
    objectType As Type,
    listViewId As String
) As CollectionSourceBase
public CollectionSourceBase CreateCollectionSource(
    IObjectSpace objectSpace,
    Type objectType,
    string listViewId
)
Public Function CreateCollectionSource(
    objectSpace As IObjectSpace,
    objectType As Type,
    listViewId As String
) As CollectionSourceBase

Parameters

Name Type Description
objectSpace IObjectSpace

An IObjectSpace object that represents an Object Space for the objects retrieved to the created collection source.

objectType Type

The Type object that represents the type of the objects that will be retrieved to the created collection source.

listViewId String

A string value representing the target List View's identifier.

Parameters

Name Type Description
objectSpace IObjectSpace

An IObjectSpace object that represents an Object Space for the objects retrieved to the created collection source.

objectType Type

The Type object that represents the type of the objects that will be retrieved to the created collection source.

listViewId String

A string value representing the target List View's identifier.

Parameters

Name Type Description
objectSpace IObjectSpace

An IObjectSpace object that represents an Object Space for the objects retrieved to the created collection source.

objectType Type

The Type object that represents the type of the objects that will be retrieved to the created collection source.

listViewId String

A string value representing the target List View's identifier.

Returns

Type Description
CollectionSourceBase

A CollectionSourceBase object that represents the collection source of objects whose type is specified by the objectType parameter.

Returns

Type Description
CollectionSourceBase

A CollectionSourceBase object that represents the collection source of objects whose type is specified by the objectType parameter.

Returns

Type Description
CollectionSourceBase

A CollectionSourceBase object that represents the collection source of objects whose type is specified by the objectType parameter.

Remarks

This method creates a collection source for the View specified by the listViewID parameter. Generally, you can create it directly via the constructor of the required collection source type.

This method can be currently used only in Windows Forms applications which utilize the XtraGrid control for displaying List Views.

By default, this method is used to retrieve objects for the following List Views:

  • Lookup Property Editor's List View;
  • List View in the pop-up Window invoked by the Link or Unlink Action.

The CollectionSourceBase.Mode property of the created CollectionSource is set to XafApplication.DefaultCollectionSourceMode property value.

See Also