windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-baseview-3825ba37.md
Gets the grid control that owns a specific View.
Namespace : DevExpress.XtraGrid.Views.Base
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
[Browsable(false)]
[DefaultValue(null)]
public GridControl GridControl { get; set; }
<Browsable(False)>
<DefaultValue(Nothing)>
Public Property GridControl As GridControl
| Type | Default | Description |
|---|---|---|
| GridControl | null |
A GridControl object that owns the current View.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the GridControl 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.
BaseEdit groupEdit = column.RealColumnEdit.CreateEditor();
groupEdit.Parent = view.GridControl;
if (groupEdit is CheckEdit)
winforms-grid-display-icons-in-data-cells/CS/Form1.cs#L86
//
this.gridView1.GridControl = this.gridControl1;
this.gridView1.Name = "gridView1";
winforms-grid-show-context-menu-for-rows/CS/FormGridMenu.cs#L34
if (radioGroup1.EditValue.ToString() == "Standard Menu")
ContextMenu1.Show(view.GridControl, e.Point);
winforms-grid-draw-thick-border-abound-focused-cell/CS/Form1.cs#L80
//
this.gridView1.GridControl = this.gridControl1;
this.gridView1.Name = "gridView1";
public GridControl GridControl {
get { return _GridView.GridControl; }
}
Dim groupEdit As BaseEdit = column.RealColumnEdit.CreateEditor()
groupEdit.Parent = view.GridControl
If TypeOf groupEdit Is CheckEdit Then
winforms-grid-display-icons-in-data-cells/VB/Form1.vb#L79
'
gridView1.GridControl = gridControl1
gridView1.Name = "gridView1"
winforms-grid-show-context-menu-for-rows/VB/FormGridMenu.vb#L28
view.FocusedRowHandle = e.HitInfo.RowHandle
If Equals(radioGroup1.EditValue.ToString(), "Standard Menu") Then ContextMenu1.Show(view.GridControl, e.Point)
If Equals(radioGroup1.EditValue.ToString(), "DevExpress Menu") Then
winforms-grid-draw-thick-border-abound-focused-cell/VB/Form1.vb#L80
'
Me.gridView1.GridControl = Me.gridControl1
Me.gridView1.Name = "gridView1"
Get
Return _GridView.GridControl
End Get
See Also