'Deklaration
Function GetParentRow( _ ByVal relation As ITableRelation _ ) As ITableRow
ITableRow GetParentRow( ITableRelation relation )
ITableRow^ GetParentRow( ITableRelation^ relation )
Parameter
- relation
- Die Relation zur Eltern-Tabelle.
'Deklaration
Function GetParentRow( _ ByVal relation As ITableRelation _ ) As ITableRow
ITableRow GetParentRow( ITableRelation relation )
ITableRow^ GetParentRow( ITableRelation^ relation )
public ITableRow GetParentRow(ITableRelation relation) { DataViewManager manager = _dataRowView.DataView.DataViewManager; DataView parentView = manager.CreateDataView(manager.DataSet.Tables[relation.ParentTableName]); String childValue = _dataRowView[relation.ChildColumnName].ToString(); // apply row filter parentView.RowFilter = relation.ParentColumnName + "='" + childValue + "'"; DataRowViewWrapper wrapper = new DataRowViewWrapper(parentView[0]); return wrapper; }
Public Function GetParentRow(relation As ITableRelation) As ITableRow Dim manager As DataViewManager = _dataRowView.DataView.DataViewManager Dim parentView As DataView = manager.CreateDataView(manager.DataSet.Tables(relation.ParentTableName)) Dim childValue As [String] = _dataRowView(relation.ChildColumnName).ToString() ' apply row filter parentView.RowFilter = relation.ParentColumnName + "='" + childValue + "'" Dim wrapper As New DataRowViewWrapper(parentView(0)) Return wrapper End Function
Plattformen: Windows 10 (Version 21H2 - 22H2), Windows 11 (21H2 - 23H2), Windows Server 2016 - 2022
.NET: .NET Framework 4.8, .NET 6, .NET 8, .NET 9