Unplanned
Last Updated: 24 Jan 2023 07:47 by Development
Development
Created on: 24 Jan 2023 07:47
Category: Button
Type: Bug Report
2
Bug when Button is in ItemTemplate of RadToolBar and the ToolBar is disabled/enabled by code
We have noticed a bug in the latest version of Telerik Controls (2023.1.117). We need to disable/enable toolbar in certain circumstances by code to avoid that the user push buttons.

We are using ItemTemplates with RadButtons inside.

Disabling the toolbar is possible but when we reenable the toolbar the buttons remain disabled.
Version 2022.3.1109 worked.

At the moment we are using a workaround and enable/disable not the toolbar but with a foreach the buttons in the itemtemplate directly, but this is unfortunately very cumbersome.

Reproduction code:
<script runat="server">
protected void OnCLick(object sender, EventArgs e)
{
	Test.Items[0].Enabled = !Test.Items[0].Enabled;

	Response.Write("Button is " + Test.Items[0].Enabled);
}
</script>


<telerik:RadScriptManager ID="MainRSM" runat="server" EnableScriptCombine="true" EnableCdn="false" AsyncPostBackTimeout="500" EnableEmbeddedjQuery="true" OutputCompression="AutoDetect" />
<telerik:RadToolBar Id="Test" runat="server">
	<Items>
		<telerik:RadToolBarButton>
			<ItemTemplate>
				<telerik:RadButton runat="server" Text="Test" />
			</ItemTemplate>
		</telerik:RadToolBarButton>
	</Items>
</telerik:RadToolBar>

<telerik:RadButton runat="server" Text="Enable/Disable button" OnClick="OnCLick" />

0 comments