System.Data.DataRow.SetParentRow C# (CSharp) Method

SetParentRow() public method

public SetParentRow ( DataRow parentRow ) : void
parentRow DataRow
return void
        public void SetParentRow(DataRow parentRow)
        {
            SetNestedParentRow(parentRow, true);
        }

Same methods

DataRow::SetParentRow ( DataRow parentRow, DataRelation relation ) : void

Usage Example

Example #1
0
 private static void SetNestedParentRow(DataRow childRow, DataRow parentRow)
 {
     DataRelation rel = GetNestedParentRelation(childRow);
     //we should not set this row's parentRow if the table doesn't match.
     if (rel != null)
     {
         if (parentRow == null || rel.ParentKey.Table != parentRow.Table)
             childRow.SetParentRow(null, rel);
         else
             childRow.SetParentRow(parentRow, rel);
     }
 }
All Usage Examples Of System.Data.DataRow::SetParentRow