Hi,
Anybody can help me how to disable radtextbox that (ShowButton="true") when click RadioButton? Even though I set radtextbox to disable on client site and textbox is disable,but button is still showing.
I will publish my code for reference.
.aspx
(
<table>
<tr>
<td>
<asp:RadioButton ID="radGuest" Checked="true" runat="server" GroupName="t" Text="Guest" />
</td>
<td colspan="4">
<telerik:RadTextBox ShowButton="true" ID="txtGuest" Text="" runat="server" Width="250px">
<ClientEvents OnButtonClick="OnGuestClick" />
</telerik:RadTextBox>
<asp:HiddenField ID="hdnGuestKey" Value = "" runat="server" />
</td>
</tr>
<tr>
<td>
<asp:RadioButton ID="radCompany" runat="server" GroupName="t" Text="Company" />
</td>
<td colspan="4">
<telerik:RadTextBox ShowButton="true" ID="txtCompany" Text="" runat="server" Width="250px">
<ClientEvents OnButtonClick="OnCompanyClick" />
</telerik:RadTextBox>
<asp:HiddenField ID="hdnCompany" Value = "" runat="server" />
</td>
</tr>
</table>
)
Client Site
(
$telerik.$(function () {
$telerik.$('#<%=radGuest.ClientID %>').unbind('change').bind('change', function () {
var txtGuest = $find('<%=txtGuest.ClientID %>');
var txtCompany = $find('<%=txtCompany.ClientID %>');
txtGuest.enable();
txtCompany.disable();
});
$telerik.$('#<%=radCompany.ClientID %>').unbind('change').bind('change', function () {
var txtGuest = $find('<%=txtGuest.ClientID %>');
var txtCompany = $find('<%=txtCompany.ClientID %>');
txtGuest.disable();
txtCompany.enable();
});
});
)
Anybody can help me how to disable radtextbox that (ShowButton="true") when click RadioButton? Even though I set radtextbox to disable on client site and textbox is disable,but button is still showing.
I will publish my code for reference.
.aspx
(
<table>
<tr>
<td>
<asp:RadioButton ID="radGuest" Checked="true" runat="server" GroupName="t" Text="Guest" />
</td>
<td colspan="4">
<telerik:RadTextBox ShowButton="true" ID="txtGuest" Text="" runat="server" Width="250px">
<ClientEvents OnButtonClick="OnGuestClick" />
</telerik:RadTextBox>
<asp:HiddenField ID="hdnGuestKey" Value = "" runat="server" />
</td>
</tr>
<tr>
<td>
<asp:RadioButton ID="radCompany" runat="server" GroupName="t" Text="Company" />
</td>
<td colspan="4">
<telerik:RadTextBox ShowButton="true" ID="txtCompany" Text="" runat="server" Width="250px">
<ClientEvents OnButtonClick="OnCompanyClick" />
</telerik:RadTextBox>
<asp:HiddenField ID="hdnCompany" Value = "" runat="server" />
</td>
</tr>
</table>
)
Client Site
(
$telerik.$(function () {
$telerik.$('#<%=radGuest.ClientID %>').unbind('change').bind('change', function () {
var txtGuest = $find('<%=txtGuest.ClientID %>');
var txtCompany = $find('<%=txtCompany.ClientID %>');
txtGuest.enable();
txtCompany.disable();
});
$telerik.$('#<%=radCompany.ClientID %>').unbind('change').bind('change', function () {
var txtGuest = $find('<%=txtGuest.ClientID %>');
var txtCompany = $find('<%=txtCompany.ClientID %>');
txtGuest.disable();
txtCompany.enable();
});
});
)