System.Xml.XmlDataDocument.SetNestedParentRegion C# (CSharp) Method

SetNestedParentRegion() private method

private SetNestedParentRegion ( XmlBoundElement childRowElem, XmlBoundElement parentRowElem ) : void
childRowElem XmlBoundElement
parentRowElem XmlBoundElement
return void
        private void SetNestedParentRegion(XmlBoundElement childRowElem, XmlBoundElement parentRowElem)
        {
            DataRow childRow = childRowElem.Row;
            if (parentRowElem == null)
            {
                SetNestedParentRow(childRow, null);
                return;
            }

            DataRow parentRow = parentRowElem.Row;
            Debug.Assert(parentRow != null);
            // We should set it only if there is a nested relationship between this child and parent regions
            DataRelation[] relations = childRow.Table.NestedParentRelations;
            if (relations.Length != 0 && relations[0].ParentTable == parentRow.Table) // just backward compatable
            {
                SetNestedParentRow(childRow, parentRow);
            }
            else
            {
                SetNestedParentRow(childRow, null);
            }
        }

Same methods

XmlDataDocument::SetNestedParentRegion ( XmlBoundElement childRowElem ) : void
XmlDataDocument