Back to Devexpress

GridControl.CreateView(String) Method

windowsforms-devexpress-dot-xtragrid-dot-gridcontrol-dot-createview-x28-system-dot-string-x29.md

latest2.8 KB
Original Source

GridControl.CreateView(String) Method

Creates a View of the specified type.

Namespace : DevExpress.XtraGrid

Assembly : DevExpress.XtraGrid.v25.2.dll

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

Declaration

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

Parameters

NameTypeDescription
nameString

A String that specifies the View type.

|

Returns

TypeDescription
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

MainView

LevelTree

CardView

GridView

BandedGridView

AdvBandedGridView

GridControl Class

GridControl Members

DevExpress.XtraGrid Namespace