windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-baseview-e276c410.md
Gets a value indicating whether the current View is a detail View.
Namespace : DevExpress.XtraGrid.Views.Base
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
[Browsable(false)]
public virtual bool IsDetailView { get; }
<Browsable(False)>
Public Overridable ReadOnly Property IsDetailView As Boolean
| Type | Description |
|---|---|
| Boolean |
true if the current View is a detail View; otherwise, false.
|
The return value of the IsDetailView property indicates whether a View has a parent View. Thus, it returns false for the GridControl.MainView which has a zero nesting level and for detail pattern Views. For detail clone Views, the property returns true.
To obtain the nested level of a view, use the BaseView.DetailLevel property.
The following code snippets (auto-collected from DevExpress Examples) contain references to the IsDetailView 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-select-detail-rows-when-selecting-master-row/CS/MasterDetailSelectionHelper.cs#L25
{
if (_GridView.IsDetailView)
{
winforms-grid-load-refresh-detail-data-from-database/CS/WindowsApplication297/Form1.cs#L61
ColumnView view = (ColumnView)gridControl1.FocusedView;
if(!view.IsDetailView) return;
winforms-grid-select-detail-rows-when-selecting-master-row/VB/MasterDetailSelectionHelper.vb#L22
Private Sub _GridView_SelectionChanged(ByVal sender As Object, ByVal e As DevExpress.Data.SelectionChangedEventArgs)
If _GridView.IsDetailView Then
Dim masterRowHandle As Integer = _GridView.SourceRowHandle
winforms-grid-load-refresh-detail-data-from-database/VB/WindowsApplication297/Form1.vb#L62
Dim view As ColumnView = CType(gridControl1.FocusedView, ColumnView)
If Not view.IsDetailView Then Return
Dim key As Object = GetRowKey(CType(view.ParentView, ColumnView), view.SourceRowHandle)
See Also