Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error: missing update of ErrorProviderBrokenRules
Message
From
06/03/2006 09:00:57
 
 
To
06/03/2006 07:55:19
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01101686
Message ID:
01101697
Views:
15
hmm, using the post delete hook does not seem tio be the right way, so I think the solution should be changing the ClearAllRules code to the following (similar changes shuold be made to ClearAllWarnings):

public override void ClearAllRules()
{
mmErrorProviderArgs ep;

this.BrokenRules.Clear();

// Clear all error provider broken rules
for (int i = 0; i < ErrorProviderBrokenRules.Count; i++)
{
ep = (mmErrorProviderArgs)ErrorProviderBrokenRules[i];
if (ep.DataView != null)
{
// Bug fix begin:
if (ep.Row < ep.DataView.Count)
{
ep.DataView[ep.Row].Row.SetColumnError(ep.ColumnName, "");
}
//ep.DataView[ep.Row].Row.SetColumnError(ep.ColumnName, "");
// bug fix end


}
else
{
if (ep.ErrorDataSet != null)
{
// Bug fix begin:
if (ep.Row < ep.ErrorDataSet.Tables[ep.TableName].Rows.Count)
{
ep.ErrorDataSet.Tables[ep.TableName].Rows[ep.Row].SetColumnError(ep.ColumnName, "");
}
//ep.ErrorDataSet.Tables[ep.TableName].Rows[ep.Row].SetColumnError(ep.ColumnName, "");
// bug fix end
}
}
}

this.ErrorProviderBrokenRules.Clear();
}


regards

Stig Nielsson
Previous
Reply
Map
View

Click here to load this message in the networking platform