
Harry Kable
Top achievements
Rank 1
Harry Kable
asked on 14 Apr 2010, 07:01 AM
Is it possible to set (and remove) the read only property of a RadTextBox using client side script?
5 Answers, 1 is accepted
0
Accepted

Princy
Top achievements
Rank 2
answered on 14 Apr 2010, 09:10 AM
Hello Harry,
I tried following client-side code in my application to set the RadTextBox in ReadOnly mode.
javascript:
Hope this helps,
Princy.
I tried following client-side code in my application to set the RadTextBox in ReadOnly mode.
javascript:
<script type="text/javascript"> |
function setReadOnly() |
{ |
var TextBox1 = $find("<%= RadTextBox1.ClientID %>"); |
TextBox1._textBoxElement.readOnly = true; |
} |
</script> |
Hope this helps,
Princy.
0

Harry Kable
Top achievements
Rank 1
answered on 14 Apr 2010, 09:29 AM
Hi Princy
Thanks for the quick and accurate reply. Works for me too.
Is there a manual describing the various elements that make up each control or do you rely on Firebug?
Harry
Thanks for the quick and accurate reply. Works for me too.
Is there a manual describing the various elements that make up each control or do you rely on Firebug?
Harry
0
0

Harry Kable
Top achievements
Rank 1
answered on 15 Apr 2010, 04:40 AM
Hi Shinu
Thanks you for your reply. However, nothing that I can see in the support documentation explaims why I should use the property _textBoxElement.
Are you able to help?
Thanks
Harry
Thanks you for your reply. However, nothing that I can see in the support documentation explaims why I should use the property _textBoxElement.
Are you able to help?
Thanks
Harry
0
Hello Harry,
_textBoxElement is a property, which is normally for internal use, that's why it is not documented officially. The standard operations aimed at the RadInput textbox controls are executed via API methods, instead of referencing the textbox DOM element directly. Setting readOnly is an exception, as it is uncommon to toggle this property client-side.
Regards,
Dimo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
_textBoxElement is a property, which is normally for internal use, that's why it is not documented officially. The standard operations aimed at the RadInput textbox controls are executed via API methods, instead of referencing the textbox DOM element directly. Setting readOnly is an exception, as it is uncommon to toggle this property client-side.
Regards,
Dimo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.