Back to Devexpress

BaseView.GridControl Property

windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-baseview-3825ba37.md

latest5.5 KB
Original Source

BaseView.GridControl Property

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

Declaration

csharp
[Browsable(false)]
[DefaultValue(null)]
public GridControl GridControl { get; set; }
vb
<Browsable(False)>
<DefaultValue(Nothing)>
Public Property GridControl As GridControl

Property Value

TypeDefaultDescription
GridControlnull

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.

winforms-grid-enable-editing-in-group-row-to-change-cell-values/CS/WindowsApplication3/GroupEditProvider.cs#L141

csharp
BaseEdit groupEdit = column.RealColumnEdit.CreateEditor();
groupEdit.Parent = view.GridControl;
if (groupEdit is CheckEdit)

winforms-grid-display-icons-in-data-cells/CS/Form1.cs#L86

csharp
//
this.gridView1.GridControl = this.gridControl1;
this.gridView1.Name = "gridView1";

winforms-grid-show-context-menu-for-rows/CS/FormGridMenu.cs#L34

csharp
if (radioGroup1.EditValue.ToString() == "Standard Menu")
    ContextMenu1.Show(view.GridControl, e.Point);

winforms-grid-draw-thick-border-abound-focused-cell/CS/Form1.cs#L80

csharp
//
this.gridView1.GridControl = this.gridControl1;
this.gridView1.Name = "gridView1";

winforms-grid-copy-cell-value-to-other-cells-by-dragging-its-right-bottom-edge/CS/Classes/SelectedCellsBorderHelper.cs#L42

csharp
public GridControl GridControl {
    get { return _GridView.GridControl; }
}

winforms-grid-enable-editing-in-group-row-to-change-cell-values/VB/WindowsApplication3/GroupEditProvider.vb#L136

vb
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

vb
'
gridView1.GridControl = gridControl1
gridView1.Name = "gridView1"

winforms-grid-show-context-menu-for-rows/VB/FormGridMenu.vb#L28

vb
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

vb
'
Me.gridView1.GridControl = Me.gridControl1
Me.gridView1.Name = "gridView1"

winforms-grid-copy-cell-value-to-other-cells-by-dragging-its-right-bottom-edge/VB/Classes/SelectedCellsBorderHelper.vb#L46

vb
Get
    Return _GridView.GridControl
End Get

See Also

BaseView Class

BaseView Members

DevExpress.XtraGrid.Views.Base Namespace