Skip to main content

BaseView.ViewRepository Property

Gets the View repository that owns the current View.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v24.1.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

[Browsable(false)]
public ViewRepository ViewRepository { get; }

Property Value

Type Description
DevExpress.XtraGrid.Repository.ViewRepository

A DevExpress.XtraGrid.Repository.ViewRepository object representing the repository that owns the current View.

Remarks

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 this View is automatically added to the grid’s View repository. The Views in this repository can be used as pattern Views or assigned to the GridControl.MainView property.

To access the collection of Views contained in the grid’s View repository either the DevExpress.XtraGrid.Repository.ViewRepository.Views or the GridControl.ViewCollection property can be used. To add a View to the grid’s View repository, add it to this collection.

See Also