Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
985
How do I Validate XamWebComboEditor?
posted

I would like to validate XamWebComboEditor, if it is blank, I would like to visually display red border (similar to text box validation when you set ValidatesOnExceptions=True,NotifyOnValidationError=True)

Is there any way?

Thanks in advance.

Parents
No Data
Reply
  • 27093
    posted

    Hello,

     

    I have been looking into this issue and couldn’t figure out how to use the Exception notification for the XamWebComboEditor’s  empty text state. On the other hand I had no trouble doing this in code using the SelectionChanged event:

     

    private void xamWebCombo1_SelectionChanged(object sender, EventArgs e)

    {

        if ((sender as XamWebComboEditor).SelectedIndex == -1)

        {

            (sender as XamWebComboEditor).BorderBrush = new SolidColorBrush(Colors.Red);

        }

        else (sender as XamWebComboEditor).BorderBrush = new SolidColorBrush(Colors.Black);

    }

     

    Hope this works for your scenario.

     

    Sincerely,

    Petar Monov

    Developer Support Engineer

    Infragistics Bulgaria

    www.infragistics.com/support

Children
No Data