Skip to main content
.NET Framework 4.5.2+

CollectionSource Class

The Collection Source used for the List Views that display collections of business objects.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v23.1.dll

NuGet Package: DevExpress.ExpressApp


public class CollectionSource :


The CollectionSource is used by the root (see View.IsRoot) List Views. Generally, you can expect a List View to use the CollectionSource in the following cases:

A CollectionSource instance is created in Client mode (the default setting), but you can set a DataView, Server, ServerView, InstantFeedback, InstantFeedbackView, or Queryable mode (see CollectionSourceBase.DataAccessMode) in the Application Model. In the Model Editor, navigate to the target List View node and set the IModelListView.DataAccessMode property to one of the CollectionSourceDataAccessMode enumeration values.


If you want to create a Collection Source for a nested List View in Server, ServerView, InstantFeedback, InstantFeedbackView, or Queryable mode, make sure that there is no logic for sorting, filtering or something else in the collection’s getter, and there are no subscribers to the collection’s events. This logic and subscribers won’t be taken into account, because a standalone server collection will be created instead of the original one.

XAF automatically creates and manipulates a Collection Source when it creates a List View. However, the following typical tasks require you to instantiate or access a Collection Source manually:

  • Create a custom List View. To be able to do it, you need to first create the required collection source.
  • Filter a collection of objects that a List View displays on the data source level. To do this, you need to access the List View’s Collection Source (see Criteria Property of a List View’s Collection Source).


See Also