Disable controls during ajax

2 posts, 0 answers
  1. Cal
    Cal avatar
    4 posts
    Member since:
    Oct 2010

    Posted 09 Nov 2010 Link to this post

      Forgive me as this may seem like a newbie question, I'm trying to do a simple operation of disabling a control (asp.net Button) during an Ajax operation based on this article:
    The structure I have as follow

    <telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server">
    <telerik:AjaxSetting AjaxControlID="btnFilter">
                    <telerik:AjaxUpdatedControl ControlID="grdReport" LoadingPanelID="RadAjaxLoadingPanel1"
                        UpdatePanelHeight="" />

    Master page

    <script type="text/javascript">
        function RequestStart(sender, args) {
    <script type="text/javascript">
    function RequestStart(sender, args)
    args.EventTargetElement.disabled = true;
    function ResponseEnd(sender, args)
    args.EventTargetElement.disabled = false;

        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
         <telerik:RadAjaxManager id="RadAjaxManager1" runat="server">
          <ClientEvents OnRequestStart="RequestStart" OnResponseEnd="ResponseEnd" />

    Now, args.EventTargetElement is always coming as null, I tried placing the script in the usercontrol but that didn't make a difference.  Can you please help?

  2. Pavlina
    Pavlina avatar
    6187 posts

    Posted 10 Nov 2010 Link to this post

    Hello Cal,

    Should you need the server or client-side RadAjaxManager functionality (like ResponseScripts collection, ajaxRequest function) you can get the "master" manager instance via Server-Side GetCurrent method from the user control code-behind. Please refer to the help articles below for more information:
    RadAjax and WebUserControls
    AJAX Manager Proxy

    I hope this helps.

    All the best,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top