public void BeginEdit() { if (inEdit) { return; } inEdit = true; backupCopy = this.MemberwiseClone() as mymember; }
public void EndEdit() { if (!inEdit) { return; } inEdit = false; backupCopy = null; }
public override ValidationResult Validate(object value, System.Globalization.CultureInfo cultureInfo) { mymember item = (value as BindingGroup).Items[0] as mymember; if (item.weight > 500) { return(new ValidationResult(false, "weight is too high")); } else if (item.weight > 50) { return(new ValidationResult(false, "weight is too low")); } else { return(ValidationResult.ValidResult); } }