Hello,
I have to define a page to configure conditions for an alarming system.
Radzen has generated from the database the following two classes:
[Table("AlarmTriggerCondition", Schema = "alarm")]
public partial class AlarmTriggerCondition
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int ID
{
get;
set;
}
public ICollection<AlarmConditionsConfiguration> AlarmConditionsConfigurations { get; set; }
public ICollection<AlarmAction> AlarmActions { get; set; }
public ICollection<AlarmConditionsConfiguration> AlarmConditionsConfigurations1 { get; set; }
public int AlarmDelay
{
get;
set;
}
public string AlarmAliasName
{
get;
set;
}
public string OperationValue
{
get;
set;
}
public int OperationConditionID
{
get;
set;
}
public OperationCondition OperationCondition { get; set; }
}
[Table("AlarmConditionsConfiguration", Schema = "alarm")]
public partial class AlarmConditionsConfiguration
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int ID
{
get;
set;
}
public ICollection<AlarmAction> AlarmActions { get; set; }
public Int64 AlarmInputID
{
get;
set;
}
public AlarmInputItem AlarmInputItem { get; set; }
public int AlarmOnTrigger
{
get;
set;
}
public AlarmTriggerCondition AlarmTriggerCondition { get; set; }
public int AlarmOffTrigger
{
get;
set;
}
public AlarmTriggerCondition AlarmTriggerCondition1 { get; set; }
}
My page for creating a new configuration looks so:
Every field has a unique name and the required validators are correctly
assigned to the fields.
In running state the page before entering data looks so:
My problem is that when I am enter i.e. the first Alarm Alias and press tab, the required validator of the second Alarm Alias field is shown "required".
The same happens for all fields. So when I am enter a value for the first Condition
Value field, the require validator of the second Condition Value fields is fired.
What I am doing wrong?
Here is the page code:
AddAlarmConditionsConfiguration.zip (1.3 KB)