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

[Solved] Disable controls during callback

3 Answers 249 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Flemming Rosenbrandt
Top achievements
Rank 1
Flemming Rosenbrandt asked on 03 Sep 2007, 06:26 AM

Hi

I use a couple of functions that you gave in the forum a while ago. They disable controls during callback.

function RequestStart(sender, args)
  {
   var ctrl = document.getElementById(args.EventTarget);
  if (ctrl != null)
   {
    ctrl.disabled = true;
   }
  }
function ResponseEnd(sender, args)
 {
  var ctrl = document.getElementById(args.EventTarget);
  if (ctrl != null)
   {
    ctrl.disabled = false;
   }
 }

AjaxManager:

<ClientEvents OnRequestStart="RequestStart" OnResponseEnd="ResponseEnd" />

...

Is this still the correct way to do it with the Prometheus controls?

And wouldn’t it be a nice thing to implement directly in the AjaxManager?

/Flemming Rosenbrandt

3 Answers, 1 is accepted

Sort by
0
Chris Gillies
Top achievements
Rank 1
answered on 03 Sep 2007, 10:20 AM
After a quick test and looking at the Prometheus Ajax documentation (http://www.telerik.com/help/radcontrols/prometheus/ajxDisableControlsDuringAJAX.html), this seems like the correct approach. Do you suggest implementing a collection that would contain all the controls that would be disabled on ajax request?
0
Flemming Rosenbrandt
Top achievements
Rank 1
answered on 03 Sep 2007, 10:26 AM

” Do you suggest implementing a collection that would contain all the controls that would be disabled on ajax request?”

Yes – this could be a solution – or the possibility to disable all/none of the controls or the control making the request. Most of  the time I want all controls to be disabled during an ajax request.

/Flemming Rosenbrandt

0
Steve
Telerik team
answered on 03 Sep 2007, 10:56 AM
Hello Flemming,

We already have this suggestion logged for the asp.net ajax controls. I will log it for the Prometheus version as well, and if feasible we will introduce such functionality out of the box. Your Telerik points have been updated.

All the best,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Ajax
Asked by
Flemming Rosenbrandt
Top achievements
Rank 1
Answers by
Chris Gillies
Top achievements
Rank 1
Flemming Rosenbrandt
Top achievements
Rank 1
Steve
Telerik team
Share this question
or