2023.1.314 breaks radcombobox code

0 Answers 94 Views
ComboBox
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Fit2Page asked on 22 Mar 2023, 08:47 AM

I have the following scenario: after a postback

RadCombobox with enabled=False breaks AXD code like attached sceenshot. No Telerik components are working anymore. I am 100% sure this was working before the update.

When I set the RadCombobox the to enabled=True everything works fine.

Please advise...

 

Marc

Rumen
Telerik team
commented on 22 Mar 2023, 09:22 AM

Hi Marc,

I am sorry for the inconvenience caused by this error!

The bug is reproduced and logged for fixing for the next version. A workaround is provided in the bug report item https://feedback.telerik.com/aspnet-ajax/1601363-uncaught-typeerror-cannot-read-properties-of-null-reading-get-wrapper-combobox

Place this Script on the Page with the ComboBox and it will override the Combo's internal function.

<script>
    // Condition to ensure the Telerik.Web.UI.RadComboBox object is instantiated and is present on the page
    if (Telerik && Telerik.Web && Telerik.Web.UI && Telerik.Web.UI.RadComboBox) {
        // store the original function in a variable
        var originalFunction = Telerik.Web.UI.RadComboBox.prototype.set_enabled;
        // override the original function
        Telerik.Web.UI.RadComboBox.prototype.set_enabled = function (value) {
            // add the override
            if (!this._view) {
                this._view = new Telerik.Web.UI.RadComboBox.ViewFactory.GetView(this);
            }

            // call the original function after the override
            originalFunction.call(this, value);
        }
    }
</script>
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
commented on 22 Mar 2023, 09:34 AM

Thanks Rumen, this works
Rumen
Telerik team
commented on 22 Mar 2023, 09:39 AM

Thank you for the confirmation, Marc!

No answers yet. Maybe you can help?

Tags
ComboBox
Asked by
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or