Skip to main content
A newer version of this page is available. .

GridControl.AvailableViews Property

Gets the collection of registered View types.

Namespace: DevExpress.XtraGrid

Assembly: DevExpress.XtraGrid.v19.1.dll

Declaration

[Browsable(false)]
public virtual InfoCollection AvailableViews { get; }

Property Value

Type Description
DevExpress.XtraGrid.Registrator.InfoCollection

A collection of View types that can be created using the designer or the GridControl.CreateView method.

Remarks

When you need to create a new View and make use of it at design time, you will need to create a BaseInfoRegistrator descendant that will provide information about the new View. This information includes the designer that will be used for the view, default styles, etc. The descendant created should reside within the AvailableViews collection so that you can add your custom View at design time.

By default, the AvailableViews collection contains information about the following CardView, GridView, BandedGridView and AdvBandedGridView Views. The corresponding BaseInfoRegistrator descendants are CardInfoRegistrator, GridInfoRegistrator, BandedGridInfoRegistrator and AdvBandedGridInfoRegistrator. Note that you may use one of these registrator objects for your custom View. This may take place, for instance, if you create a GridView descendant to provide custom View initialization.

Note: to register a new view, you will need to change the grid control’s RegisterAvailableViews method implementation. Thus, you may rewrite the method and recompile the grid control. Another method is to create a grid control’s descendant and override the method to register your View.

Note that Views registered in the AvailableViews collection can be created using the grid control’s GridControl.CreateView method.

See Also