I am simply trying to set a textbox to readonly on a client side button click.
I have seen examples that mention getting the _textBoxElement, but that doesn't work.
Or I should say attempting to use that mechanism says _textBoxElement isn't supported
on the client side object I have.
Here is my script:
var
tbConnectionName = document.getElementById( "ConnectionNameTextBox" );
var cbInitiate = document.getElementById( "InitiateConnectionCheckBox" );
var tb = $telerik.toTextBox( tbConnectionName );
//tb._textBoxElement.readOnly = true;
var e = tb.get_element;
tbConnectionName.readonly =
true;
cbInitiate.disabled = bDisabled;
Disabling the cbInitiate object works fine, but none of my attempts to set readonly
on the tbConnectionName object have been successful.
BTW here is the corresponding HTML:
<div style="width:85%; float:right;">
<telerik:RadTextBox
ID="ConnectionNameTextBox"
ClientIDMode="Static"
MaxLength="80"
runat="server"
Width="300px" TabIndex="4" />
</div>
<div style="width:85%; float:right;">
<asp:CheckBox ID="InitiateConnectionCheckBox" runat="server"
AutoPostBack="True"
AccessKey="I"
ClientIDMode="Static"
OnCheckedChanged="InitiateConnectionCheckBoxClicked"
TabIndex="5" Text="Initiate a connection if not already connected" />
</div>
Right now I am considering maing an Ajax request in my onclick event and setting
the property in server side code. We can set ReadOnly quite successfully all over the place in server side code. Doing this seems excessive though.
Any help greatly appreaciated.