select an item from the dropdown, different than "1"
expected: buttons become enabled
actual: radbutton is still disabled
<asp:Button ID="ButtonTest" runat="server" enabled="true" Text="Test" EnableViewState="False" />
<telerik:RadPushButton ID="RadButtonTest" runat="server" Text="RadButtonTest" Enabled="True" EnableViewState="False" RenderMode="Lightweight"></telerik:RadPushButton>
<asp:DropDownList runat="server" ID="DropDownTest" AutoPostBack="True" OnSelectedIndexChanged="SelectedIndexChanged_Test">
<Items>
<asp:ListItem Text="1" Value="1"></asp:ListItem>
<asp:ListItem Text="2" Value="2"></asp:ListItem>
<asp:ListItem Text="3" Value="3"></asp:ListItem>
<asp:ListItem Text="4" Value="4"></asp:ListItem>
</Items>
</asp:DropDownList>
protected void Page_LoadComplete(object sender, EventArgs e)
{
if (DropDownTest.SelectedValue == "1")
{
ButtonTest.Enabled = false;
RadButtonTest.Enabled = false;
}
else//workaround
{
string script = string.Format("function f(){{$find('{0}').set_enabled({1});Sys.Application.remove_load(f);}}Sys.Application.add_load(f);",
RadButtonTest.ClientID,
"true");
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "someKey", script, true);
}
}
protected void SelectedIndexChanged_Test(object sender, EventArgs e)
{
}
Using RequiredFieldValidator with RadButton (ToogleButton type), RadRadioButtons and RadCheckButtons throws a server exception that cannot be validated. Workaround: ASP.NET: <telerik:RadRadioButtonList ID="RadRadioButtonList1" runat="server" Text="RadRadioButtonList" > <Items> <telerik:ButtonListItem Text="Item 1" Value="0" /> <telerik:ButtonListItem Text="Item 2" Value="1" /> </Items> </telerik:RadRadioButtonList> <asp:CustomValidator ID="CustomButtonListValidator" ErrorMessage="errormessage" runat="server" OnServerValidate="CustomButtonListValidator_ServerValidate" /> C#: protected void CustomButtonListValidator_ServerValidate(object source, ServerValidateEventArgs args) { args.IsValid = (RadRadioButtonList1.SelectedIndex > -1); }
This is a duplicate of http://feedback.telerik.com/Project/108/Feedback/Details/210060, see there for a workaround and for status updates. You can change the DPI settings in Windows from the Display Settings. Setting a size of 125% and clicking on a button will throw a server exception: ------- Input string was not in a correct format. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.FormatException: Input string was not in a correct format. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [FormatException: Input string was not in a correct format.] System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +12526913 System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +120 Telerik.Web.UI.RadImageButton.LoadPostData(String postDataKey, NameValueCollection postCollection) +256 Telerik.Web.UI.RadWebControl.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +16 System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +457 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1833
RadButton with ButtonType="ToggleButton", ToggleType="CheckBox" or ToggleType="Radio" in lightweight mode, renders the icons and the text labels at incorrect position. For the time being, you can use the following CSS as a workaround: .RadButton.rbCheckBox span.rbText, .RadButton.rbRadioButton span.rbText, .RadButton.rbToggleButton span.rbText { vertical-align: initial; /* FF and Chrome */ vertical-align: auto; /* IE */ } button.RadButton { vertical-align: initial; vertical-align: auto; }
For the time being the following workaround can be used: <script> function OnClientClicked() { alert('OnClientClicked'); } function OnClientClicking() { alert('OnClientClicking'); } function fixBtnClicked(sender, args) { sender._useModules = false; } </script> <telerik:RadButton ID="RadButton1" runat="server" ButtonType="LinkButton" Text="Click" OnClientLoad="fixBtnClicked" Target="_parent" NavigateUrl="http://www.google.com" OnClientClicked="OnClientClicked" OnClientClicking="OnClientClicking" />
For the time being you can use the following workaround: JavaScript: <script> function fixBtnRepaint(sender, args) { sender._useModules = false; } </script> ASPX: <telerik:RadButton ID="RadButton1" runat="server" Text="Click" OnClientLoad="fixBtnRepaint"> </telerik:RadButton>
Currently the default height of RadButton with Silk skin and CssClass="rbPrimaryButton" is 28px. The correct height must be auto, so that the text inside the RadButton can be wrapped when it is longer and no height is specified. For the time being the following CSS workaround can be used: CSS: span.RadButton.RadButton_Silk.rbLinkButton.rbPrimaryButton { height: auto; } ASPX: <telerik:RadButton ID="RadButton1" runat="server" Skin="Silk" ButtonType="SkinnedButton" Text="aaaaaaaaaaa bbbbbbbbbbbbbb cccccccccccc" Width="200px" CssClass="rbPrimaryButton" /> <telerik:RadButton ID="RadButton3" runat="server" Skin="Silk" ButtonType="SkinnedButton" Text="aaaaaaaaaaa bbbbbbbbbbbbbb cccccccccccc" Width="200px" CssClass="rbSecondaryButton" />
For the time being the following JavaScript workaround can be used: JavaScript: function pageLoad() { fixImageURL(); } function fixImageURL() { var imageBtns = $telerik.$('.rbImageButton'); for (var i = 0; i < imageBtns.length; i++) { var btnStyle = imageBtns[i].getAttribute('style').replace("background-image:url(", "background-image:url('").replace(");", "');"); imageBtns[i].setAttribute('style', btnStyle); } } ASPX: <telerik:RadButton ID="RadButton1" runat="server" Width="50px" Height="50px"> <Image ImageUrl="50x50.png" /> </telerik:RadButton> <telerik:RadButton ID="RadButton2" runat="server" Width="50px" Height="50px"> <Image ImageUrl="50x50.png" /> </telerik:RadButton>
When there is a RadButton with configured ValidationGroup, the client-side ASP.NET validation on the page will not be executed, if there are validation controls, which use the same ValidationGroup. The unexpected behaviour is observed in FireFox and Opera.
If the Target property of the RadButton (ButtonType="LinkButton") is set to a custom string (the name of the target window, where the content of the linked page will be rendered), the link is not opened. For the time being the following workaround can be used: JavaScript: <script> function OnClientClicked(sender, args) { var target = sender.get_target(); var navURL = sender.get_navigateUrl(); window.open(navURL, target) } </script> ASPX: <telerik:RadButton ID="RadButton1" runat="server" ButtonType="LinkButton" Text="click" Target="MyWindow" NavigateUrl="http://www.google.com" OnClientClicked="OnClientClicked" />
Important: The issue only occurs when the Buttons are spread around in different rows in RadGrid.
When multiple RadButtons (ButtonType="ToggleButton" ToggleType="Radio") are grouped through GroupName property, the server-side property checked doesn't take effect when the button which is to be checked is declared before the current checked button. The workaround is to execute JavaScript from the server which sets the checked property. For example: C#: string script = "function f(){$find(\"" + RadButton1.ClientID + "\").set_checked(true); Sys.Application.remove_load(f);}Sys.Application.add_load(f);"; ScriptManager.RegisterStartupScript(this, this.GetType(), "key", script, true);
RadButton's clicking is triggered when the following conditions are met: -input type="text" handles onkeypress event -onkeypress event focuses the RadButton -the key pressed that is handled by onkeypress event is Space or Enter Triggering the clicking with "Space" can be workaround by setting some timeout to the focus(). For example: ASPX: <telerik:RadButton ID="RadButton1" runat="server" Text="RadButton"></telerik:RadButton> <input type="text" name="name" value=" " onkeypress="KeyPressed();" /> JavaScript: function KeyPressed() { setTimeout(function () { $find("RadButton1").focus(); }, 200); }
When the RadButton is used as a toggle button and some of its toggle state buttons are set with PrimaryIconCssClass property the icons might not be displayed if the following conditions are met at the same time: -AutoPostBack property of the RadButton is set to false -One of the togglestate buttons is selected and its PrimaryIconCssClass property is not set. The issue does not affect the functionality of the button, just the displaying of the icons in the togglestate buttons.
When the RadButton is hovered with the mouse pointer being over the button's text, the hover state is lost. This behavior is observed with Silk and Glow skins under IE 9 or less. The workaround is to set the ButtonType to "SkinnedButton" or "LinkButton".
When a SingleClick RadButton is clicked and its AutoPostBack property is set to false its disabled state as well as the optional text from the SingleClickText property are persisted. For the time being the SingleClick functionality can be set on the client. For example: ASPX: <script type="text/javascript"> function DoSubscriptionValidation(button, args) { var isPostBack = window.confirm("Perform postback?"); button.set_autoPostBack(isPostBack); if (isPostBack) { button.set_singleClick(true); button.set_singleClickText("Please Wait"); button.click(); } } </script> <telerik:RadButton ID="RadButton1" runat="server" Text="Click" OnClick="OnClick1" OnClientClicking="DoSubscriptionValidation" /> C#: protected void OnClick1(object sender, EventArgs e) { System.Threading.Thread.Sleep(2000); }
The workaround is to override the background image of the button: CSS: <style> .RadButton.RadButton_Default.rbLinkButton .rbPrimaryIcon { background-image: url("images/Groups (16x16).png"); } </style> ASPX: <telerik:RadButton ID="RadButton1" runat="server" ButtonType="LinkButton" Text="Click" Skin="Default"> <Icon PrimaryIconUrl="images/myImage (16x16).png" PrimaryIconTop="2" PrimaryIconLeft="2" /> </telerik:RadButton>
When the focus of the RadButton is set on the server-side, the active element becomes the inner input and not the span wrapper of the button. For the time being the client-side focus can be set. For example: <telerik:RadButton ID="serverFocusBtn" runat="server" RenderMode="Classic" Text="Postback" TabIndex="0" OnClientLoad="btn_load" /> <script type="text/javascript"> function btn_load(btn) { btn.focus(); } </script>