GridControl.ViewCollection Property

Provides access to the collection of Views in the grid’s View repository.

Namespace: DevExpress.XtraGrid

Assembly: DevExpress.XtraGrid.v21.1.dll


public ViewRepositoryCollection ViewCollection { get; }

Property Value

Type Description

A DevExpress.XtraGrid.Repository.ViewRepositoryCollection object that represents the collection of Views within the grid’s View repository.


The Views used to represent the data in the Grid Control should be added to a View repository represented by an object of the DevExpress.XtraGrid.Repository.ViewRepository class. When a View’s BaseView.GridControl property is initialized it is automatically added to the grid’s View repository. Views in this repository can be used as pattern Views or assigned to the GridControl.MainView property.

The ViewCollection property represents a collection of the Views within the grid’s View repository. To add a View to the grid’s View repository, add it to this collection.

The GridControl.Views collection allows you to access Views that are currently used in the grid control (displayed on-screen). It contains the View specified by the GridControl.MainView property and detail clone Views.

See Also