This is a migrated thread and some comments may be shown as answers.

RadAutoCompleteBox Style Validation Error

2 Answers 74 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Ivo
Top achievements
Rank 1
Ivo asked on 16 Jul 2013, 04:50 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 17 Jul 2013, 04:38 AM
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.
0
Ivo
Top achievements
Rank 1
answered on 17 Jul 2013, 03:48 PM
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.
Tags
AutoCompleteBox
Asked by
Ivo
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Ivo
Top achievements
Rank 1
Share this question
or