View Full Version : [CLOSED] Formpanel dynamically change 'AllowBlank' and ValidityChange

Jan 22, 2016, 9:30 AM
Good Moring

I need to add and remove the AllowBlank attribute on Textfields on a Formpanel.
I do it like that

If Convert.ToString(cboDBSchema.Value) = "1" Then
TextFieldSchemaName.AllowBlank = True
TextFieldSchemaName.IndicatorText = String.Empty
TextFieldSchemaName.AllowBlank = False
TextFieldSchemaName.IndicatorText = "*"
End If

That works so far, but the ValidityChange Handler doesn't detect this changes ? In my example, the save button disable state on the form is triggered by this handler and the button stays disabled in case of the first condition (Value =="1").

What can I do to change that behave ?


Jan 22, 2016, 6:38 PM
Hello Peter!

Have you tried calling also the TextField's TextFieldSchemaName.ValidateBlank and maybe after the changes, calling TextFieldSchemaName.Validate()? The last would reevaluate the field for validity status.

Hope that helps! If not, please provide a full test case so we can also know the situations where the changes happen and provide you more accurate feedback.