Completed
Last Updated: 13 Jan 2023 11:56 by ADMIN
Release R1 2023

Code & steps to replicate the issue.

  1. At the initial load, the TargetButton is enabled.
  2. Click the "Toggle Enabled State and Do PostBack" which will disable the button using the set_enabled property and do a PostBack. 
  3. Click again on the "Toggle Enabled State and Do PostBack" to enable the TargetButton and do another PostBack.
  4. While the TargetButton gets enabled via JavaScript, the server still renders the Button as disabled after the PostBack.
<telerik:RadButton runat="server" ID="RadButton1" Text="Target Button" AutoPostBack="true" EnableViewState="true" />
<br />
<br />
<telerik:RadButton runat="server" ID="RadButton2" Text="Toggle Enabled State and Do PostBack" OnClientClicked="toggleEnabledState" AutoPostBack="true" />

<script>
    function toggleEnabledState(sender, args) {
        var radButton1 = $find("<%=   RadButton1.ClientID %>");

        radButton1.set_enabled(!radButton1.get_enabled());
    }
</script>
1 2 3 4 5 6