I have validated the LookupEdit using ValidationProvider.I have written some code in Editvaluechange event and validating even of Lookupedit.
I want the LookUpedit value to be entered compulsory.So i have set IsNotBlank Property of Validation Provider for LookUpedit.When user doesnt enter anyhting and focus is moved to close button of the form( i.e Close button of ControlBox) the form is not closed.I want the form to be closed even if no value is entered in LookupEdit and if user clicks on CLose button.
I have also written
CustomValidationProvider.ValidationMode = DevExpress.XtraEditors.DXErrorProvider.ValidationMode.Default
in form closing event but the form closes when the close button is clicked for second time and not for the first time.