The issue occurs when setting the Enabled property to false, which triggers a JavaScript error and causes the components to break.
Code to replicate the problem
<telerik:RadTextBox ID="RadTextBox1" runat="server" Enabled="false"></telerik:RadTextBox>
Agreed. The ASP.NET AJAX2025.2.528 (2025 Q2 SP1) hotfix seems to work fine so far.
Thanks for the quick turn-around on that.
Jeff
Hi Michael,
Thank you for the update, and I'm really sorry to hear about the trouble this issue caused in your application. We understand how frustrating and time-consuming unexpected behavior like this can be, especially when it's unclear where the problem originates.
Regards,
Rumen
Progress Telerik
This issue caused a mess in my app. I spent several hours trying to figure out what I broke, before opening a ticket and being pointed to this article.
I just installed the hotfix and am happy to report it seems to fix the issue!
Regards,
Rumen
Progress Telerik
Hi,
We used option 2 to solve the problem. However, we had to modify it cause it was not working at first.
We had to put the line identified in the image below in a trycatch()
Thanks.
Dear developers,
Our team has agreed to fixing this in the next release, thus the workaround is only needed Temporarily.
I have also shared an additional approach in the Workaround section. This approach is intended to help developers who might be using many pages without a MasterPage and avoid editing all pages.
We apologize for any inconvenience this may have caused!
Regards,
Attila Antal
Progress Telerik
Same problem
This same problem occurs with RadDatePicker controls also - only when disabled as you mention above.
I agree with Patrice that the workaround is not a good solution and would cause my client a lot of code changes. We have close to 1,000 pages in the site and it would be hard to determine which pages are affected. Also removing your workaround after you fix it would cause even more work.
If you can publish a hot-fix version soon, I would appreciate it.
Jeff Taylor
Hello Derek,
Thank you for reporting the problem! We have identified the issue in the source code and found a temporary workaround that can be used until a fix is released.
A Temporary workaround for this would be to add the following JavaScript override to the project.
Option 1
Place the following Script on the MasterPage to avoid duplicating the content for each page but it is important to be placed after ScriptManager/RadScriptManager declaration.
<script>
(function () {
try {
var original_set_enabled = Telerik.Web.UI.RadInputControl.prototype.set_enabled;
Telerik.Web.UI.RadInputControl.prototype.set_enabled = function (value) {
if (this._enabled !== value) {
this._enabled = value;
if (this._textBoxElement) {
this._textBoxElement.disabled = !this._enabled;
}
if (this.get_wrapperElement())
this.updateCssClass();
this.updateClientState();
if (this.get_enableAriaSupport()) {
this._applyAriaStateChange('disabled', !value);
}
this.raisePropertyChanged('enabled');
}
}
} catch (e) {
// There is nothing to do.
}
})();
</script>
Option 2
In case the project Pages are not using a MasterPage and there are too many of them to edit, you can create a Custom Module which will inject the script to any Page that is served by the Web Server.
Create a class in the project that implements the IHttpModule interface. Note: Web Site projects require the class to be added to the App_Code folder
using System;
using System.Web;
namespace MyApplication.Modules
{
public class ScriptInjectionModule : IHttpModule
{
public void Init(HttpApplication context)
{
context.PreRequestHandlerExecute += (sender, e) =>
{
var app = (HttpApplication)sender;
var page = app.Context.CurrentHandler as System.Web.UI.Page;
if (page != null)
{
page.PreRender += (s, args) =>
{
string script = @"
<script type='text/javascript'>
(function () {
try {
var original_set_enabled = Telerik.Web.UI.RadInputControl.prototype.set_enabled;
Telerik.Web.UI.RadInputControl.prototype.set_enabled = function (value) {
if (this._enabled !== value) {
this._enabled = value;
if (this._textBoxElement) this._textBoxElement.disabled = !this._enabled;
if (this.get_wrapperElement()) this.updateCssClass();
this.updateClientState();
if (this.get_enableAriaSupport()) this._applyAriaStateChange('disabled', !value);
this.raisePropertyChanged('enabled');
}
}
} catch (e) { }
})();
</script>";
if (!page.ClientScript.IsStartupScriptRegistered("TelerikInputFix"))
{
page.ClientScript.RegisterStartupScript(page.GetType(), "TelerikInputFix", script);
}
};
}
};
}
public void Dispose() { }
}
}
Register the module through the web.config
<?xml version="1.0"?>
<configuration>
<modules runAllManagedModulesForAllRequests="true">
<add name="MyScriptInjectionModule" type="MyApplication.Modules.ScriptInjectionModule" />
</modules>
</configuration>
Regards,
Attila Antal
Progress Telerik