Stop RadTextbox from clearing text on focus?

3 posts, 0 answers
  1. Kevin Price
    Kevin Price avatar
    49 posts
    Member since:
    Sep 2012

    Posted 15 Dec 2010 Link to this post

    I have a RadTextBox that is having its value attribute set via javascript/ajax call $telerik.$.get. This works great except that when the control receives focus, the text is erased??? How can I turn this off? There is no code set for the onfocus event.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 16 Dec 2010 Link to this post

    Hello Kevin,


    I am not sure about how you set the RadTextBox value from client. The set_value() method is used to set textbox value from client.

    You can find remaining most important client methods by going through the following link.
    RadTextBox Client Object



    -Shinu.
  3. Kevin Price
    Kevin Price avatar
    49 posts
    Member since:
    Sep 2012

    Posted 16 Dec 2010 Link to this post

    Thanks Shinu. The problem is that for some reason, $find isn't returning the object - always null. getElementById works - and while allowing me to set the value via setAttribute(value, ...), it seems that even though the value is set (because text appears in the textbox) its value really isn't set. I have other objects in the same page that $find is working for perfectly and have tried quite a few ways/places to access this object with the same result. I know the ID is valid because ClientID returns a valid value. I think I'll add this to a support ticket as regardless, you'd think that you could work with these objects using standard javascript methods ???

    UPDATE: Figured it out.
    I did not realize when you use RadTextBox that 2 textboxes are created and that the value is actually set on the hidden object. Problem solved.
Back to Top