In Development
Last Updated: 21 Nov 2024 09:37 by ADMIN
Scheduled for 2025 Q1 (Feb)
Paul
Created on: 19 Nov 2024 09:53
Category: PushButton
Type: Bug Report
0
PostBackUrl in a RadPushButton doesn't work in latest version

If the PushButton has a PostBackUrl, when clicked, it will not go to the specified page. You can work around it with the below code: 

let $T = Telerik.Web.UI;

if ($T) {
    let originalFunction = $T.Button.PostbackFunctionality.prototype._postback;

    $T.Button.PostbackFunctionality.prototype._postback = function () {
        var that = this,
            o = that.options,
            cState = o.controlState;

        if (!o.postbackReference) {
            var shouldPostback = o.submitBtn && (cState.splitButtonClicked || !that._isInput);

            if (shouldPostback) {
                __doPostBack(o.controlId, cState.eventArguments);
            }

            return !shouldPostback;
        }

        var postbackFunction = o.postbackReference.replace('WebForm_DoPostBackWithOptions', 'this.WebForm_DoPostBackWithOptions');

        postbackFunction = postbackFunction.replace('RadButtonEventArguments', cState.eventArguments);

        return eval(postbackFunction);
    }
}

0 comments