windowsforms-devexpress-dot-xtragrid-dot-gridcontrol-d50c463c.md
Gets or sets which control borders are docked to its parent control and determines how a control is resized with its parent.
Namespace : DevExpress.XtraGrid
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
public override DockStyle Dock { get; set; }
Public Overrides Property Dock As DockStyle
| Type | Description |
|---|---|
| DockStyle |
A DockStyle value.
|
In Split Presentation mode, a GridControl is placed within a GridSplitContainer, by occupying its entire region. The Dock property is set to Fill and cannot be changed in this mode.
The following code snippets (auto-collected from DevExpress Examples) contain references to the Dock property.
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.
winforms-grid-display-icons-in-data-cells/CS/Form1.cs#L75
//
this.gridControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridControl1.Location = new System.Drawing.Point(0, 0);
winforms-grid-draw-thick-border-abound-focused-cell/CS/Form1.cs#L68
//
this.gridControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridControl1.EmbeddedNavigator.Name = "";
winforms-grid-create-configure-sql-data-source/CS/dxSample/Form1.cs#L37
_Grid.MainView = view;
_Grid.Dock = DockStyle.Fill;
Controls.Add(_Grid);
winforms-grid-use-layoutview-as-master-view/CS/WindowsApplication3/MasterDetailHelper.cs#L68
GridControl grid = new GridControl();
grid.Dock = System.Windows.Forms.DockStyle.Fill;
return grid;
winforms-pivotgrid-how-to-display-underlying-data/CS/DrillDownDataSourceExample/Form1.cs#L46
grid.Parent = form;
grid.Dock = DockStyle.Fill;
grid.DataSource = dataSource;
winforms-grid-display-icons-in-data-cells/VB/Form1.vb#L69
'
gridControl1.Dock = DockStyle.Fill
gridControl1.Location = New System.Drawing.Point(0, 0)
winforms-grid-draw-thick-border-abound-focused-cell/VB/Form1.vb#L69
'
Me.gridControl1.Dock = System.Windows.Forms.DockStyle.Fill
Me.gridControl1.EmbeddedNavigator.Name = ""
winforms-grid-create-configure-sql-data-source/VB/dxSample/Form1.vb#L44
_Grid.MainView = view
_Grid.Dock = DockStyle.Fill
Controls.Add(_Grid)
winforms-grid-use-layoutview-as-master-view/VB/WindowsApplication3/MasterDetailHelper.vb#L78
Dim grid As New GridControl()
grid.Dock = System.Windows.Forms.DockStyle.Fill
Return grid
winforms-pivotgrid-how-to-display-underlying-data/VB/DrillDownDataSourceExample/Form1.vb#L44
grid.Parent = form
grid.Dock = DockStyle.Fill
grid.DataSource = dataSource
See Also