RadTextBox Border Color

2 posts, 0 answers
  1. Constantine
    Constantine avatar
    6 posts
    Member since:
    Jan 2009

    Posted 30 Jul 2012 Link to this post

    I am trying to update the border color of a RadTextBox using javascript.  The below snippit works great for the textbox in my datetimepickers but does not work for a radtextbox/radnumerictextbox:
    DateTime.get_textBox().style.borderColor = "#FF0000";

    This is the modified version that I am using with just the normal radtextbox:
    TextBox.style.borderColor = "#FF0000";

    Given that the get_textBox function is simply accessing the radtextbox component of the datetime picker should the same syntax not work on the straight radtextbox?


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

    Posted 31 Jul 2012 Link to this post

    Hi Constantine,

    Try setting the RadTextbox style as follows to achieve your scenario.

    <script type="text/javascript">
    function pageLoad()
     var textbox = $find("<%=RadTextBox1.ClientID %>");
     textbox._element.style.borderColor = "#FF0000";

    Hope this helps.

  3. DevCraft R3 2016 release webinar banner
Back to Top