>Hi,
>
>I've got an ASP.NET form with an mmGridView showing the many side of a one to many relationship between two tables. When a value in this grid is changed to one that causes a business rule to fail the error icon does not get displayed in the grid. How can I achieve this?
Just an update for anyone interested:
Josh of OakLeaf is investigating what the problem is. He cannot see anything wrong with my code, yet the GridView's ErrorMessage property is not getting populated even though the error is being detected. So he is investigating if there is a problem with a GridView bound to a child BO not getting its ErrorMessage set properly within MM.NET. Has anyone else encountered this?
At least for now I have a work around whereby I can check if an error rule applies to a grid and manually set the grid's ErrorMessage. Here's some code that does it:
mmSaveDataResult result = this.Save(this.oPolicyHeader); //, this.dsPolicy, this.oPolicy.TableName);
if (result == mmSaveDataResult.RulesPassed)
{
this.SetSessionToNull();
Response.Redirect("~/PolicySearch.aspx");
}
else
{
string rules = this.oPolicyRider.Rules.GetAllBrokenRules();
if (rules != string.Empty)
this.grdRiders.ErrorMessage = rules;
}