This commit is contained in:
Kathy Ruffing 2011-03-01 13:20:57 +00:00
parent 5802cfdd10
commit bcacc4ed5b
2 changed files with 10 additions and 0 deletions

View File

@ -844,6 +844,11 @@ namespace VEPROMS.CSLA.Library
} }
public void Dispose() public void Dispose()
{ {
if (_MyGrid != null)
{
_MyGrid.Dispose();
_MyGrid = null;
}
RemoveFromDictionaries(); RemoveFromDictionaries();
} }
private void RemoveFromDictionaries() private void RemoveFromDictionaries()

View File

@ -286,6 +286,10 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("MyGrid", true); CanReadProperty("MyGrid", true);
if (_ContentGridCount == -1 && _MyGrid != null)
{
_MyGrid = null;
}
if (_ContentGridCount != 0 && _MyGrid == null) if (_ContentGridCount != 0 && _MyGrid == null)
{ {
_MyGrid = GridInfo.Get(_ContentID); _MyGrid = GridInfo.Get(_ContentID);
@ -601,6 +605,7 @@ namespace VEPROMS.CSLA.Library
// _MyGrid.Dispose();// Dispose related value // _MyGrid.Dispose();// Dispose related value
// _MyGrid = null;// Reset related value // _MyGrid = null;// Reset related value
// } // }
if (_MyGrid != null && tmp.MyGrid != null) _MyGrid.ResetContent(tmp.MyGrid);
_ContentGridCount = -1;// Reset Count _ContentGridCount = -1;// Reset Count
//RHM Removed 20090724 - Duplicates function of code above. //RHM Removed 20090724 - Duplicates function of code above.
// - Dispose caused error when a new step was added. // - Dispose caused error when a new step was added.