3 Answers, 1 is accepted
0

Princy
Top achievements
Rank 2
answered on 12 Sep 2012, 08:41 AM
Hi Orim,
I was not able to replicate the issue in telerik version 2012, 2, 724, 35. Following is the sample code that I tried which worked as expected at my end. Please provide your code if doesn't helps.
ASPX:
C#:
Note: I tried disabling the RadButton onclick of an asp:Button.
Regards,
Princy.
I was not able to replicate the issue in telerik version 2012, 2, 724, 35. Following is the sample code that I tried which worked as expected at my end. Please provide your code if doesn't helps.
ASPX:
<
telerik:RadWindow
ID
=
"RadWindow1"
runat
=
"server"
OpenerElementID
=
"RadButton1"
></
telerik:RadWindow
>
<
telerik:RadButton
ID
=
"RadButton1"
runat
=
"server"
Enabled
=
"false"
></
telerik:RadButton
>
<
asp:Button
ID
=
"btn"
runat
=
"server"
onclick
=
"btn_Click"
/>
C#:
protected
void
btn_Click(
object
sender, EventArgs e)
{
RadButton1.Enabled =
false
;
}
Regards,
Princy.
0

orim
Top achievements
Rank 1
answered on 12 Sep 2012, 09:45 AM
Hi Princy,
i tried both .net 3.5 and .net 4.0 Telerik Controls. The Problem is if i use IE 9 with Browser Mode and Doc Mode IE9
then i can still open the radwindow when the radbutton is disabled - on click.
If i use IE 8, Firefox it does work
i tried both .net 3.5 and .net 4.0 Telerik Controls. The Problem is if i use IE 9 with Browser Mode and Doc Mode IE9
then i can still open the radwindow when the radbutton is disabled - on click.
If i use IE 8, Firefox it does work
0
Accepted
Hi guys,
Let me shed some light on the matter.
The disabled attribute is relevant only for input elements, while the RadButtons wrapper is an anchor element. This means that, according to specifications, setting disabled="disabled" should not affect its behavior. This works like it is supposed to only in IE and this is why you are experiencing the described behavior.
The RadWindow's OpenerElementID property is a simple one that only attaches an event handler for the onclick event to the target. When the target is disabled this event is not fired by the browser (e.g. for a regular button type submit). For an anchor, however, the event will still be fired and the RadWindow will be shown which is the case with the RadButton.
What I can advise is that you use the OnClientClicked or OnClientClicking events of the RadButton (often along with the AutoPostBack property) to attach a function that will open the RadWindow. This help article explains how a RadWindow can be opened and this blog post explains how to work with the RadButton events.
Regards,
Marin Bratanov
the Telerik team
Let me shed some light on the matter.
The disabled attribute is relevant only for input elements, while the RadButtons wrapper is an anchor element. This means that, according to specifications, setting disabled="disabled" should not affect its behavior. This works like it is supposed to only in IE and this is why you are experiencing the described behavior.
The RadWindow's OpenerElementID property is a simple one that only attaches an event handler for the onclick event to the target. When the target is disabled this event is not fired by the browser (e.g. for a regular button type submit). For an anchor, however, the event will still be fired and the RadWindow will be shown which is the case with the RadButton.
What I can advise is that you use the OnClientClicked or OnClientClicking events of the RadButton (often along with the AutoPostBack property) to attach a function that will open the RadWindow. This help article explains how a RadWindow can be opened and this blog post explains how to work with the RadButton events.
Regards,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.