GridControl.CreateView(String) Method

Creates a View of the specified type.

Namespace: DevExpress.XtraGrid

Assembly: DevExpress.XtraGrid.v21.2.dll


public virtual BaseView CreateView(
    string name


Name Type Description
name String

A String that specifies the View type.


Type Description

A BaseView descendant representing the new View.


The name parameter defines the View type registered in the GridControl.AvailableViews collection. To create a CardView object, pass the ‘CardView‘ string. The ‘GridView‘, ‘BandedGridView‘ and ‘AdvBandedGridView‘ strings allow you to create GridView, BandedGridView and AdvBandedGridView Views respectively.

Note that you can also create Views using their constructors.

After the View has been created, you can either assign it to the GridControl.MainView property or add it to the GridControl.LevelTree tree.

See Also