XafApplication.CreateCollectionSource(IObjectSpace, Type, String) Method
Creates a collection source for a specified List View.
Namespace: DevExpress.ExpressApp
Assembly: DevExpress.ExpressApp.v24.2.dll
NuGet Package: DevExpress.ExpressApp
#Declaration
public CollectionSourceBase CreateCollectionSource(
IObjectSpace objectSpace,
Type objectType,
string listViewId
)
#Parameters
Name | Type | Description |
---|---|---|
object |
IObject |
An IObject |
object |
Type | The Type object that represents the type of the objects that will be retrieved to the created collection source. |
list |
String | A string value representing the target List View’s identifier. |
#Returns
Type | Description |
---|---|
Collection |
A Collection |
#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.