diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/Content.cs b/PROMS/VEPROMS.CSLA.Library/Generated/Content.cs index da815ab3..33e1d357 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/Content.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/Content.cs @@ -844,6 +844,11 @@ namespace VEPROMS.CSLA.Library } public void Dispose() { + if (_MyGrid != null) + { + _MyGrid.Dispose(); + _MyGrid = null; + } RemoveFromDictionaries(); } private void RemoveFromDictionaries() diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/ContentInfo.cs b/PROMS/VEPROMS.CSLA.Library/Generated/ContentInfo.cs index 539218da..4dc4de1a 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/ContentInfo.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/ContentInfo.cs @@ -286,6 +286,10 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("MyGrid", true); + if (_ContentGridCount == -1 && _MyGrid != null) + { + _MyGrid = null; + } if (_ContentGridCount != 0 && _MyGrid == null) { _MyGrid = GridInfo.Get(_ContentID); @@ -601,6 +605,7 @@ namespace VEPROMS.CSLA.Library // _MyGrid.Dispose();// Dispose related value // _MyGrid = null;// Reset related value // } + if (_MyGrid != null && tmp.MyGrid != null) _MyGrid.ResetContent(tmp.MyGrid); _ContentGridCount = -1;// Reset Count //RHM Removed 20090724 - Duplicates function of code above. // - Dispose caused error when a new step was added.