windowsforms-devexpress-dot-xtraverticalgrid-dot-vgridcontrolbase-dot-ctor-306fb68e.md
Initializes a new instance of the VGridControlBase class.
Namespace : DevExpress.XtraVerticalGrid
Assembly : DevExpress.XtraVerticalGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.VerticalGrid
public VGridControlBase()
Public Sub New
The sample code below shows you how to:
The result of executing the sample code is shown in the image below:
using DevExpress.XtraVerticalGrid;
private void Form1_Load(object sender, System.EventArgs e) {
// creating a new vertical grid control
VGridControl vGrid1 = new VGridControl();
this.Controls.Add(vGrid1);
vGrid1.Dock = DockStyle.Fill;
// creating the data source for the grid
DataSet gridSource = new DataSet();
gridSource.ReadXml("E:\\DBs\\cars.xml");
// binding the grid to the data source and creating rows for all fields
vGrid1.DataSource = gridSource.Tables["Cars"];
vGrid1.RetrieveFields();
}
Imports DevExpress.XtraVerticalGrid
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles MyBase.Load
' creating a new vertical grid control
Dim VGrid1 As New VGridControl()
Me.Controls.Add(vGrid1)
VGrid1.Dock = DockStyle.Fill
' creating the data source for the grid
Dim GridSource As New DataSet()
GridSource.ReadXml("E:\DBs\cars.xml")
' binding the grid to the data source and creating rows for all fields
VGrid1.DataSource = GridSource.Tables("Cars")
VGrid1.RetrieveFields()
End Sub
See Also