RadButton Strange Behavior

3 posts, 1 answers
  1. Shahi
    Shahi avatar
    17 posts
    Member since:
    Apr 2013

    Posted 08 Apr 2013 Link to this post


    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,
  2. Answer
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 08 Apr 2013 Link to this post

    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).

  3. Danail Vasilev
    Danail Vasilev avatar
    1502 posts

    Posted 10 Apr 2013 Link to this post

    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:
    <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.
Back to Top