private void LoadDataSetFromTree()
{
_ignoreDataSetEvents = true;
_ignoreXmlEvents = true;
bool wasFoliationEnabled = IsFoliationEnabled;
IsFoliationEnabled = false;
bool saveEnforce = _dataSet.EnforceConstraints;
_dataSet.EnforceConstraints = false;
try
{
Debug.Assert(DocumentElement != null);
LoadRows(null, DocumentElement);
SyncRows(null, DocumentElement, true);
_dataSet.EnforceConstraints = saveEnforce;
}
finally
{
_ignoreDataSetEvents = false;
_ignoreXmlEvents = false;
IsFoliationEnabled = wasFoliationEnabled;
}
}