Avatar

Level 10

Hi Rod,

I think you were on the right track.  The calculate event does fire before the validate event but if the validate event updates the field then the calculate event will fire again.  So if there are no side effects of the calculate event and it does take to long to run then you could add the following into the validate event of the decimal field;

if (this.isNull || this.rawValue == 0)
{
this.rawValue = 1;
}
true;

In the validate event the result of the last statement determines if the field is valid, so you need the true there looking very un-JavaScript like.

Bruce