GridControl.CreateView(String) Method

Creates a View of the specified type.

Namespace: DevExpress.XtraGrid

Assembly: DevExpress.XtraGrid.v20.1.dll

Declaration

public virtual BaseView CreateView(
    string name
)
Public Overridable Function CreateView(
    name As String
) As BaseView

Parameters

Name Type Description
name String

A String that specifies the View type.

Returns

Type Description
BaseView

A BaseView descendant representing the new View.

Remarks

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