Skip to main content

GridControl() Constructor

Creates a new GridControl control.

Namespace: DevExpress.XtraGrid

Assembly: DevExpress.XtraGrid.v23.2.dll

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

Declaration

public GridControl()

Remarks

Use the constructor to create a new grid control at runtime. Note that the control’s Parent property should be initialized to make the control available on form.

During creation and initialization of a grid control a GridView is created as the main View. You can change this default View by assigning a new View to the grid control’s GridControl.MainView property.

Use the GridControl.DataSource and GridControl.DataMember properties to bind the grid to a data source. Please refer to the Data Binding and Master-Detail Relationships topics for details.

The following code snippets (auto-collected from DevExpress Examples) contain references to the GridControl() constructor.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also