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);
}
}