我正在使用devexpress 13.1,我喜欢为文本框创建自定义验证提供程序
我尝试使用此代码
DevExpress.XtraEditors.DXErrorProvider.ConditionValidationRule containsValidationRule = new DevExpress.XtraEditors.DXErrorProvider.ConditionValidationRule();
containsValidationRule.ConditionOperator = DevExpress.XtraEditors.DXErrorProvider.ConditionOperator.GreaterOrEqual;
containsValidationRule.Value1 = '0';
containsValidationRule.ErrorText = "Veuillez saisir un valeur supérieur a zéro";
containsValidationRule.ErrorType = ErrorType.Warning;
CompareAgainstControlValidationRule compValidationRule = new CompareAgainstControlValidationRule();
compValidationRule.Control = txtStockMax;
compValidationRule.CompareControlOperator = CompareControlOperator.LessOrEqual;
compValidationRule.ErrorText = "Veuillez saisir un valeur inférieur au stock max";
compValidationRule.CaseSensitive = true;
dxValidationProvider1.SetValidationRule(txtStockMin, containsValidationRule);
dxValidationProvider1.SetValidationRule(txtStockMin, compValidationRule);
我正在寻找的是txtStockMin
{0} {1}}而greaterOrEqual
txtStockMin
lessOrEqual
<{1}}