Hi good day everyone, starting with the question I needed to add an EpiCombo with a static list with only 2 data, “Almacen” and “Suministros” this data will store in a custom field. The point is that this data list only is enabled when the reason type is “M”, in the EpiViewNotification when is added a new record this field will be enabled if the reason type is “M” but If it is different from “M” this will be disabled, I use the property ReadOnly for this.
I have already debugged it and I have noticed that in the EpiViewNotification, the read-only property sets it to false, even though in the validation it had been set to true when the ReasonType is different from “M”
private void edvReasonDetail_EpiViewNotification(EpiDataView view, EpiNotifyArgs args)
{
// ** Argument Properties and Uses **
// view.dataView[args.Row]["FieldName"]
// args.Row, args.Column, args.Sender, args.NotifyType
// NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes
if ((args.NotifyType == EpiTransaction.NotifyType.Initialize))
{
this.cmbTipoEmision.ReadOnly = true;
}
if ((args.NotifyType == EpiTransaction.NotifyType.AddRow))
{
if ((args.Row > -1))
{
string ReasonType = view.dataView[args.Row]["ReasonType"].ToString();
this.cmbTipoEmision.ReadOnly = (ReasonType == "M") ? false : true;
}
}
}
Any suggestion on how it could be solved?