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

Q1 2013 - RadButton OnClick event not firing

20 Answers 215 Views
Button
This is a migrated thread and some comments may be shown as answers.
Aaron
Top achievements
Rank 1
Aaron asked on 25 Feb 2013, 03:53 PM
Just upgraded my project to Q1 2013 and now, several buttons have ceased to function when they worked just fine before the upgrade.  After reviewing this similar forum thread, I was able to fix one of the buttons by simply removing the ValidationGroup because I realized that there were no validation controls on the page, but you would think that without any validation controls, setting the ValidationGroup on the button would not have any effect.

In any case, another page that I have which does have validation controls has this problem and I am not sure how to fix it.

On the page, there is a control which nests a few other controls, all of which inherit from this base control class:
public class BaseControl : UserControl
{
    private string _ValidationGroup = null;
    [Browsable(true)]
    public string ValidationGroup
    {
        get
        {
            return _ValidationGroup;
        }
        set
        {
            _ValidationGroup = value;
            SetValidationGroup(this, _ValidationGroup);
        }
    }
    private void SetValidationGroup(Control ctrl, string validationGroup)
    {
        foreach (Control child in ctrl.Controls)
        {
            if (child is BaseValidator)
            {
                (child as BaseValidator).ValidationGroup = validationGroup;
            }
 
            if (child.HasControls() && child.Visible)
            {
                SetValidationGroup(child, validationGroup);
            }
        }
    }
}


The control definition on the page looks like this:
<controls:MyEntryControl runat="server" ID="TestEntryControl" ValidationGroup="MyValidationGroup" />
<div style="clear:both;width:750px;text-align:right;padding-top:1em;">
    <telerik:RadButton runat="server" ID="Save" Text="<%$ Resources:GlobalResources,Save %>" CausesValidation="true" ValidationGroup="MyValidationGroup" OnClick="Save_Click" />
    <telerik:RadButton runat="server" ID="Cancel" Text="<%$ Resources:GlobalResources,Cancel %>" OnClick="Cancel_Click" CausesValidation="false" />
</div>

An interesting point to note is that the PostBack does occur as the Page_Load event does get fired.  However, the Save_Click event does not fire and from what I can tell, the code skips immediately to the PreRender event of the page.  There are no errors on the page which I assume is why the postback did occur, but I see no reason that the button's click event would just stop firing, especially since it was definitely working immediately before upgrading my project.

I used the Telerik -> Rad Controls for ASP.NET AJAX -> Upgrade Wizard to upgrade my project after installing the new control sets.
I am running Visual Studio 2010 and my project is an ASP.NET Web Forms project with .NET Framework 4. 

Please let me know what can be done to resolve this issue ASAP.

20 Answers, 1 is accepted

Sort by
0
Daniel
Top achievements
Rank 1
Iron
Iron
Iron
answered on 26 Feb 2013, 05:01 AM
Hi Aaron, I'm not sure of your setup, but I had a similar issue after upgrading to Q1 2013. The issue was validation. I needed to exclude the RadButton from validation and also in the code behind click event. I needed to apply both for the button click event to fire. Good luck.

Daniel

<telerik:RadButton ID="RadButton1" runat="server" Text="RadButton" OnClick="RadButton1_Click" CausesValidation="false" />

and

protected void RadButton1_Click(object sender, EventArgs e)
{
    if (IsValid) // Comment this out
    {
    }
}

0
Danail Vasilev
Telerik team
answered on 26 Feb 2013, 12:29 PM
Hi all,

There is an issue in Q1 2013 with the Server-side OnClick event and Client-side validation of RadButton when its ValidationGroup property is set. It will be fixed in the upcoming Q1 2013 SP1 as well as in the next internal builds.

You can find a workaround and additional information on this matter in this sticky thread.

Please excuse us for the caused inconvenience.

All the best,
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.
0
Andy
Top achievements
Rank 2
answered on 26 Feb 2013, 06:01 PM
Man, you need to patch stuff like this RIGHT AWAY, or at least notify customers immediately. Anything that breaks currently working functionality is a big, big problem. Waiting until SP1 isn't good enough unless you're releasing it today.
0
Danail Vasilev
Telerik team
answered on 27 Feb 2013, 03:58 PM
Hi All,

The mentioned issues have already been fixed and you can download the latest internal build that reflects these fixes from here.

Once again, excuse us for the caused inconvenience!

Greetings,
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.
0
Daniel
Top achievements
Rank 1
Iron
Iron
Iron
answered on 28 Feb 2013, 02:08 AM
Thanks for the fix Danail.

Daniel
0
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 07 Mar 2013, 01:22 PM
I have just encountered this issue and had to revert to Q3 2012. I understand that bugs occur, but I didn't upgrade to Q1 2013 till just a day ago. Obivously this issue has been known for over a week. When I upgraded, there was NO indication that a problem this serious could occur. This bug basically broke my entire app and caused users to lose a lot of time. Telerik needs to create some sort of way to warn developers about potential issues when they upgrade control versions. This needs to go beyond the traditional "breaking changes" info they provide. They need up-to the minute information about what sorts of known bugs have been encountered in the current release and this informatoin needs to be quite visible in the version download area.
0
Daniel
Top achievements
Rank 1
Iron
Iron
Iron
answered on 07 Mar 2013, 10:21 PM
Sorry to hear about your problems Albert. We always keep the Telerik controls that we want to upgrade to in our test environment at least until the next version comes out. Whilst this seems like a simple bug, it broke almost every page in several of our apps. Better to be safe than sorry.
0
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 08 Mar 2013, 01:06 PM
Thanks. Like I said I was able to revert without any significant damage done, so I will now wait till a full service pack is released (I am not one to deploy internal builds). I have no idea how such a significant bug was introduced into a major release, but I am a software developer. I understand these things happen from time to time. What I don't understand is Telerik's willingess to allow people to continue to download the Q1 2013 controls that contain this bug without even warning them. I mean, this is pretty much the second worst kind of bug there is... the control doesn't do what its supposed to do in this common senario (I think validation is used at leas a little by developers) and there is little indication to the user or developer that something is wrong. The only thing that could be worse is if their data input controls somehow started providing incorrect "values" that get saved in database. So, IMO, Telerik should have either, immediately discontinued allowing users to download and install the Q1 2013 controls when they became aware of this bug, imeediately replaced the controls with their internal build, or at least provided some sort of message on the download screen explaining the bug and whom it might have affected
0
Andy
Top achievements
Rank 2
answered on 08 Mar 2013, 01:12 PM
I completely agree with Albert. Telerik needs to respond to bugs this significant with something other than a forum posting. Can someone from Telerik please comment on how this bug got through testing and how it will be prevented in the future?
0
Rumen
Telerik team
answered on 11 Mar 2013, 10:47 AM
Hi,

My name is Rumen Zhekov and I am the team lead of the team developing and supporting the RadButton control.

Please, accept our sincere apologies for the inconvenience this problem is causing to you and your clients.

We discussed the issue in detail with our management, development and support staff and if a critical problem arises in the future, we will release a service pack immediately after the previous official release.
This will ensure that everyone will be notified about the bug and we will no longer rely only on the sticky notes in the forums and the latest internal builds.

We do respect your feedback and one of our top goals for the upcoming Q2 2013 release is to increase the quality and responsiveness of RadControls for ASP.NET AJAX. That is why I would like to invite you to post your feature requests and bug reports in the Ideas and Feedback portal as well as to vote for them so that we can better prioritize them.

Best regards,
Rumen
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.
0
BizData
Top achievements
Rank 1
answered on 21 Mar 2013, 07:40 AM
Hi Rumen,

The link you have provided says that Q1 2013 SP1 will have the fix. When is the release date for SP1? I'm facing this issue on an upgrade to SharePoint 2013 with custom web parts using these controls, so id rather not roll back to 2012 controls if they are not fully supported inside SharePoint 2013 (the Q1 2013 release notes mention support for SharePoint 2013, I assume previous controls have issues inside SharePoint 2013?). The fix provided is not something I'd like to do for a project with over 300 user controls.

Thanks.
0
Shawn Krivjansky
Top achievements
Rank 1
answered on 21 Mar 2013, 11:09 PM
I agree with the unanimous opinion that this sort of bug can't get into a release... and if it does, it needs to be communicated much better.  Broke my entire app just now.  Almost a month after it was first reported...and yet still no official SP.  I generally don't dive into internal builds unless absolutely necessary, so my first thought after a month out was to just get the base install (most officially released install).

When is SP1 going to be out??  If we wait any longer SP1 will just be called Q2. 
0
Shawn Krivjansky
Top achievements
Rank 1
answered on 22 Mar 2013, 05:26 AM
Also, don't forget... some of us use the Telerik CDN, which makes using the internal builds impossible.

Yes, I know I can "disable" them, but not going to do that in my deployed applications... which means I have to sit around until the SP comes out.
0
Rumen
Telerik team
answered on 25 Mar 2013, 02:07 PM
Hi guys,

Q1 2013 SP1 is scheduled for the middle of next week.

I can confirm that the bug is fixed in the latest internal build, and that such builds are not suitable for production. This is why we have provided a workaround for the current version in this sticky note: In Q1 2013 Server-side OnClick event and Client-side validation are not performed when ValidationGroup is set.

In Q1 2013 we have provided official support for SharePoint 2013 and there is a new separate installations for it available in your account: 
Telerik_AJAX_Controls_For_Sharepoint2013_2013_1_220_Dev.msi
Telerik_AJAX_Controls_For_Sharepoint2013_2013_1_220_Dev.zip

On using the CDN - it can be toggled with a simple line in the web.config file which will be respected if there isn't an explicit setting in the given instance, so you can use that as a quick switch for disabling CDN and it is listed here: http://www.telerik.com/help/aspnet-ajax/scriptmanager-cdn-support.html.

Regards,
Rumen
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.
0
Shawn Krivjansky
Top achievements
Rank 1
answered on 26 Mar 2013, 06:09 PM
If you have this happen in a testing application, the "workaround" is no big deal.

If you have this issue on about 500 pages/user controls in your very big application... it makes it just a bit of a problem to implement something like this (which is to say, impossible).

That is why we need more responsiveness with official SPs for things like this.
0
Chris
Top achievements
Rank 1
answered on 02 Apr 2013, 05:39 PM
The script fix is not working for me if the page does not contain a visible RadButton. I was attempting to add the script to a master page and I am getting the javascript error "telerik is undefined" when there is no visible RadButton on the page.

I had to update the code as follows:

<script type="text/javascript">
    if (!(
        typeof Telerik === 'undefined' ||
        typeof Telerik.Web === 'undefined' ||
        typeof Telerik.Web.UI === 'undefined' ||
        typeof Telerik.Web.UI.RadButton === 'undefined'))
    {
    Telerik.Web.UI.RadButton.prototype._buildPostBackOptions = function() {            
        var options = this._getPostBackOptions() || {
            eventTarget: this.get_uniqueID(),
            eventArgument: this.get_enableSplitButton() ? 'RadButtonEventArguments': '',
            validation: this._validationGroup ? true: false,
            validationGroup: this._validationGroup,
            actionUrl: this._navigateUrl || '',
            trackFocus: false,
            clientSubmit: !this.IsInputTypeSubmit() || this.get_singleClick() || this.get_buttonType() != Telerik.Web.UI.RadButtonType.StandardButton || this.IsImageButton()
        };                  
        return "new WebForm_PostBackOptions('" + options.eventTarget + "', '"
            + options.eventArgument + "', "
            + options.validation + ", '"
            + options.validationGroup + "', '"
            + options.actionUrl + "', "
            + options.trackFocus + ", "
            + options.clientSubmit + ")";
    }
    }
    </script>
0
Robert
Top achievements
Rank 1
answered on 03 Apr 2013, 01:28 AM
@Rumen

The workaround you provided does not appear to fix the problem for IE7
0
Chris
Top achievements
Rank 1
answered on 03 Apr 2013, 01:42 PM
Actually, the workaround Telerik provided does not appear to fix the problem for IE7. Good catch. I updated my post above to remove the offending trailing comma.

Hopefully this is something they are going to catch in the update they are working on.

Chris
0
Danail Vasilev
Telerik team
answered on 04 Apr 2013, 03:43 PM
Hello Guys,

I can confirm that the workaround does not fix the issue in Internet Explorer 7. The good news, however, is that the Q1 2013 SP1 is already available for download and it fixes the mentioned issue in IE7 as well. You can also find the list of all the fixes of RadButton reflected in Q1 2013 SP1 in this article.

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.
0
BizData
Top achievements
Rank 1
answered on 05 Apr 2013, 12:37 AM
Thanks! look forward to trying the SP1 release out.
Tags
Button
Asked by
Aaron
Top achievements
Rank 1
Answers by
Daniel
Top achievements
Rank 1
Iron
Iron
Iron
Danail Vasilev
Telerik team
Andy
Top achievements
Rank 2
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Rumen
Telerik team
BizData
Top achievements
Rank 1
Shawn Krivjansky
Top achievements
Rank 1
Chris
Top achievements
Rank 1
Robert
Top achievements
Rank 1
Share this question
or