This is a migrated thread and some comments may be shown as answers.

RadButton Strange Behavior

2 Answers 58 Views
Button
This is a migrated thread and some comments may be shown as answers.
Shahi
Top achievements
Rank 1
Shahi asked on 09 Apr 2013, 02:48 AM
Hi

I am new to RadControls & now facing an issue in the registration page. The Cancel RadButton is firing the RequiredFieldValidator. Dont know how it is happening, since we have excluded the cancel button from ValidationGroup. Please help.

Thank you,
Shahi

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 09 Apr 2013, 04:17 AM
Hi Shahi,

This is one of the known issues associated with the RadButton. In some cases the validation requirements are not met and the RadButton doesn’t initiate postback, which may cause confusion if the validation is not easy to spot and the button is not supposed to be part of it.

If you want to exclude the RadButton from the validation mechanism of the page, you can set its CausesValidation property to false even if the particular RadButton is not included in your Validation group(this is also valid for a regular Button control).


Thanks,
Princy.
0
Danail Vasilev
Telerik team
answered on 10 Apr 2013, 07:54 AM
Hello Shahi,

I have tried to reproduce your issue but to no avail. You can watch a short video with the test here and then tell if I am missing something. The code I have used for the test is as follow:
ASPX:
<telerik:RadButton ID="RadButton1" runat="server" Text="OK" ValidationGroup="vg1" />
<telerik:RadButton ID="RadButton2" runat="server" Text="Cancel" />
<asp:TextBox ID="Textbox1" runat="server" ValidationGroup="vg1" />
<asp:RequiredFieldValidator ID="Requiredfieldvalidator1" ErrorMessage="errormessage"
    ValidationGroup="vg1" ControlToValidate="Textbox1" runat="server" />

Could you confirm the version of RadControls as well as the browsers and their version under which you are having the unexpected behavior? If your version of RadControls, however, is not the latest one (version 2013.1.403), does upgrading to the latest one resolve the unwanted behavior?

If the above step does not help, could you please, try reproduce the issue with the provided code snippet and then tell us what changes you have made, so that we can proceed further with the investigation?

Kind regards,
Danail Vasilev
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.
Tags
Button
Asked by
Shahi
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Danail Vasilev
Telerik team
Share this question
or