This is a migrated thread and some comments may be shown as answers.

OnBlur event does not work for radtextbox

1 Answer 111 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Vitaly
Top achievements
Rank 1
Iron
Iron
Vitaly asked on 27 Jun 2014, 08:49 PM
Hello,
please help me to resolve this issue.
As Shinu suggested to use this logic for OnBlur event:

<telerik:RadTextBox ID="ShrtgLicAreaTextBox" runat="server" TabIndex="2" Width="300px" CssClass="textbox" MaxLength="40" Height="15px" onKeyUp="Count(this,40)" onChange="Count(this,40)" ClientEvents-OnBlur="changeTextBoxColorOnBlur" >

javascript:

function changeTextBoxColorOnBlur(sender, args) {
sender.addCssClass("txtblur-style");


}

CSS:

.RadComboBox_Default .rcbFocused .rcbReadOnly .rcbInput, .riSingle .riTextBox[type="text"]:focus
{
background-color:Red !important;
}
.txtblur-style
{
background-color:Blue !important;
}

But when I move away from control using tab key the color not changing to blue as it supposed to do.

RadTextBox is located inside RadPanelBar:

<telerik:RadPanelBar ID="formPanel2" runat="server" Width="98%" ExpandMode="MultipleExpandedItems" OnClientItemClicking="onPanelItemClicking" Skin="Telerik" >
<Items>
<telerik:RadPanelItem Expanded="true" Text="REQUEST FORM" runat="server" Selected="true" Font-Bold="true" Font-Size ="13" Font-Names ="Verdana">
<Items>
<telerik:RadPanelItem Value="infoPanel" runat="server" Height="75">
<ItemTemplate>
<div style="padding: 5px;background-color :#FAFCFE;">
<telerik:RadTextBox ID="NameTextBox" runat="server" TabIndex="-1" Width="300px" CssClass="textbox" ReadOnly="true" Height="15px" >


<table width="98%" >
<tr>
<td style="width:24%;">
<label class="style">
6. SHORTAGE LICENSE AREA:
</label>
</td>
<td >
<telerik:RadTextBox ID="ShrtgLicAreaTextBox" runat="server" TabIndex="2" Width="300px" CssClass="textbox" MaxLength="40" Height="15px" onKeyUp="Count(this,40)" onChange="Count(this,40)" FocusedStyle-BackColor="#D4DEEC" ClientEvents-OnBlur="changeTextBoxColorOnBlur" >
</telerik:RadTextBox>
<asp:Image ID="ShrtgLicErrImage" runat="server" Width="14px" Height="14px" ImageUrl="~/Image/error-icon.jpg" ImageAlign="Middle" Visible="false" />
</td>

</tr>
</table>

Please help...
Vitaly  

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 30 Jun 2014, 04:33 AM
Hi Vitaly,

I have answered for your question in this forum. Let me know if you have any concern.

Thanks,
Shinu.
Tags
General Discussions
Asked by
Vitaly
Top achievements
Rank 1
Iron
Iron
Answers by
Shinu
Top achievements
Rank 2
Share this question
or