Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

VGridControlBase() Constructor

In This Article

Initializes a new instance of the VGridControlBase class.

Namespace: DevExpress.XtraVerticalGrid

Assembly: DevExpress.XtraVerticalGrid.v24.2.dll

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

#Declaration

public VGridControlBase()

#Example

The sample code below shows you how to:

  • create a new vertical grid control;
  • bind the control to data (the dynamically created dataset is assigned to the VGridControl.DataSource property for this purpose);
  • show the control on a form, filling the entire form with it (the form is assigned to the Parent property of the control).

The result of executing the sample code is shown in the image below:

VGrid - CreatingNew

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();
}
See Also