windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-baseview-658ba586.md
Gets the handle of a master row for a View.
Namespace : DevExpress.XtraGrid.Views.Base
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
[Browsable(false)]
public virtual int SourceRowHandle { get; }
<Browsable(False)>
Public Overridable ReadOnly Property SourceRowHandle As Integer
| Type | Description |
|---|---|
| Int32 |
An integer value representing a master row handle for the current detail View.
|
This property is useful for clones of detail Views only. For the GridControl.MainView and pattern Views, the SourceRowHandle property returns the GridControl.InvalidRowHandle field value.
The following code snippets (auto-collected from DevExpress Examples) contain references to the SourceRowHandle 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#L27
{
int masterRowHandle = _GridView.SourceRowHandle;
if (_GridView.GetSelectedRows().Length == _GridView.RowCount)
winforms-grid-vertically-align-detail-views/CS/DetailsUnderEachOther/Form1.cs#L82
GridView realMasterView = (GridView)fakeMasterView.ParentView;
int realMasterRow = fakeMasterView.SourceRowHandle;
int realListSourceRow = realMasterView.GetDataSourceRowIndex(realMasterRow);
winforms-grid-load-refresh-detail-data-from-database/CS/WindowsApplication297/Form1.cs#L63
object key = GetRowKey((ColumnView)view.ParentView, view.SourceRowHandle);
DataView dv = cache[key] as DataView;
winforms-grid-select-detail-rows-when-selecting-master-row/VB/MasterDetailSelectionHelper.vb#L23
If _GridView.IsDetailView Then
Dim masterRowHandle As Integer = _GridView.SourceRowHandle
If _GridView.GetSelectedRows().Length = _GridView.RowCount Then
winforms-grid-vertically-align-detail-views/VB/DetailsUnderEachOther/Form1.vb#L86
Dim realMasterView As GridView = CType(fakeMasterView.ParentView, GridView)
Dim realMasterRow As Integer = fakeMasterView.SourceRowHandle
Dim realListSourceRow As Integer = realMasterView.GetDataSourceRowIndex(realMasterRow)
winforms-grid-load-refresh-detail-data-from-database/VB/WindowsApplication297/Form1.vb#L63
If Not view.IsDetailView Then Return
Dim key As Object = GetRowKey(CType(view.ParentView, ColumnView), view.SourceRowHandle)
Dim dv As DataView = TryCast(cache(key), DataView)
See Also