windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-baseview-c0db411c.md
Returns the object which contains the internal information used to render the View.
Namespace : DevExpress.XtraGrid.Views.Base
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
[EditorBrowsable(EditorBrowsableState.Never)]
public BaseViewInfo GetViewInfo()
<EditorBrowsable(EditorBrowsableState.Never)>
Public Function GetViewInfo As BaseViewInfo
| Type | Description |
|---|---|
| DevExpress.XtraGrid.Views.Base.ViewInfo.BaseViewInfo |
A DevExpress.XtraGrid.Views.Base.ViewInfo.BaseViewInfo descendant which contains the internal information used to render the View.
|
A ViewInfo object contains all the information needed to draw the View. Use the GetViewInfo method to get this internal information.
In most cases there is no need to call this method.
The following code snippets (auto-collected from DevExpress Examples) contain references to the GetViewInfo() method.
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.
{
GridViewInfo viewInfo = view.GetViewInfo() as GridViewInfo;
GridGroupRowInfo rowInfo = viewInfo.GetGridRowInfo(hitInfo.RowHandle) as GridGroupRowInfo;
GridView view = GridControl.FocusedView as GridView;
GridViewInfo info = view.GetViewInfo() as GridViewInfo;
GridCell[] gridCells = view.GetSelectedCells();
winforms-grid-toggle-checkbox-state-with-one-click/CS/Form1.cs#L46
{
GridViewInfo vi = view.GetViewInfo() as GridViewInfo;
GridCellInfo cellInfo = vi.GetGridCellInfo(hi);
winforms-grid-scrolling-by-columns/CS/WindowsApplication3/GridHScrollHelper.cs#L81
GridViewInfo ViewInfo {
get { return view.GetViewInfo() as GridViewInfo; }
}
winforms-grid-draw-thick-border-abound-focused-cell/CS/Form1.cs#L132
e.Appearance.FillRectangle(e.Cache, e.Bounds);
((IViewController)view.GridControl).EditorHelper.DrawCellEdit(new GridViewDrawArgs(e.Cache, (view.GetViewInfo() as GridViewInfo), e.Bounds), (e.Cell as GridCellInfo).Editor, (e.Cell as GridCellInfo).ViewInfo, e.Appearance, (e.Cell as GridCellInfo).CellValueRect.Location);
}
If hitInfo.HitTest = GridHitTest.Row AndAlso view.IsGroupRow(hitInfo.RowHandle) Then
Dim viewInfo As GridViewInfo = TryCast(view.GetViewInfo(), GridViewInfo)
Dim rowInfo As GridGroupRowInfo = TryCast(viewInfo.GetGridRowInfo(hitInfo.RowHandle), GridGroupRowInfo)
winforms-grid-toggle-checkbox-state-with-one-click/VB/Form1.vb#L42
If hi.InRowCell Then
Dim vi As GridViewInfo = TryCast(view.GetViewInfo(), GridViewInfo)
Dim cellInfo As GridCellInfo = vi.GetGridCellInfo(hi)
winforms-grid-scrolling-by-columns/VB/WindowsApplication3/GridHScrollHelper.vb#L85
Get
Return TryCast(view.GetViewInfo(), GridViewInfo)
End Get
winforms-grid-draw-thick-border-abound-focused-cell/VB/Form1.vb#L136
e.Appearance.FillRectangle(e.Cache, e.Bounds)
CType(view.GridControl, IViewController).EditorHelper.DrawCellEdit(New GridViewDrawArgs(e.Cache, (TryCast(view.GetViewInfo(), GridViewInfo)), e.Bounds), (TryCast(e.Cell, GridCellInfo)).Editor, (TryCast(e.Cell, GridCellInfo)).ViewInfo, e.Appearance, (TryCast(e.Cell, GridCellInfo)).CellValueRect.Location)
End Sub
Private Function GetCellAppearance(ByVal gridRowHandle As Integer, ByVal gridColumn As GridColumn) As AppearanceObject
Dim viewInfo As GridViewInfo = TryCast(view.GetViewInfo(), GridViewInfo)
Dim cellInfo As GridCellInfo = viewInfo.GetGridCellInfo(gridRowHandle, gridColumn)
See Also