I created a control LookupListItemPicker, who inherited from EntityEditorWithPicker. Next, I created a custom control LookupControl, who inherited from BaseBindableFormControl. Next, try to add validation of input values in a lookup field. How can I do it?
I'm trying to make a control array lookup values from a list using the Sharepoint class EntityEditorWithPicker. If I make this control and use in Sharepoint, it works correctly, once I transfer the code to the control Nintex, the validation is not working. Below is an example in which I record the CustomValidation:
protected override void CreateValidationControls()
RequiredFieldValidator requiredFieldValidator = new RequiredFieldValidator();
requiredFieldValidator.ID = "requiredFieldValidator";
requiredFieldValidator.ControlToValidate = this.AssociatedControlForLabel.UniqueID;
requiredFieldValidator.ErrorMessage = string.IsNullOrEmpty(this.LookupProperties.RequiredErrorMessage) ? string.Empty : this.LookupProperties.RequiredErrorMessage;
this.RequiredFieldValidator = (BaseValidator)requiredFieldValidator;
This approach does not work, because the engine ASP.NET can't find the control for which to make the validation. I don't know what I'm doing wrong.
Sorry for my English.