RadAutoCompleteBox Style Validation Error

3 posts, 1 answers
  1. Ivo
    Ivo avatar
    8 posts
    Member since:
    Nov 2012

    Posted 16 Jul 2013 Link to this post

    Good Afternoon,

    I would like to know if it is possible to change a RadAutoCompleteBox's border colour though javascript. Also, is it possible to achieve the same validation failure styling as in a RadTextBox ?

    var registerUser_Username = $find("<%= RegisterUser_Username.ClientID %>");
     
    registerUser_Username._invalid = true;
    registerUser_Username.updateCssClass();

  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 16 Jul 2013 Link to this post

    Hi

    Please have a look at the following JavaScript code to add border color to the RadAutoCompleteBox.

    JavaScript:
    <script type="text/javascript">
        function setbordercolor() {
            var radautocompletebox1 = $find('<%=RadAutoCompleteBox1.ClientID %>');
            radacb.addCssClass("style1");
        }
    </script>

    CSS:
    <style type="text/css">
        .style1
        {
            border:1px solid red;
        }
    </style>

    As far as I know the RadAutoCompleteBox does not have such a property to invalidate the inputs.

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ivo
    Ivo avatar
    8 posts
    Member since:
    Nov 2012

    Posted 17 Jul 2013 Link to this post

    Hello Shino,

    Thank you for the quick reply. It really is a shame that components such as the RadAutoCompleteBox are not allowed to display the same error format as the RadTextBox, when they are set as invalid.

    Again, thank you.
Back to Top