AjaxMethod - is it Asynchronous

  1. #1

    AjaxMethod - is it Asynchronous

    Hi,

    I have a piece of code that validates my grid rows and makes a call to an AjaxMethod for every grid row

            this.store.each(function(rec,i){
                var gridRow=that.grid.getView().getRow(i);
                $('td span.statusImage', $(gridRow)).attr('class', 'statusImage loading');
                Coolite.AjaxMethods.TimesheetEdit.AddTimesheet(Ext.encode(rec.data),true);
            });
            [AjaxMethod]
            public static void AddTimesheet(string record, bool validate)
            {
                Thread.Sleep(5000);
            }
    If I put a Thread.Sleep(5000) inside the AjaxMethod and nothing else and start up Firebug. I notice that initially that a post is made for each grid row however each row returns 5 seconds after the previous i.e. 5 rows will take 25 seconds? This suggests that the AJAX methods are called asynchronously but perhaps my ASP.net is waiting for the previous call to finish?

    Any hints on making this truly Asynchronous....??

    Thanks for anyone who can help???
  2. #2
    Hi,

    Here is the related post.
    http://forums.ext.net/showthread.php...ll=1#post72625

    Here is the example.
    https://examples1.ext.net/#/Events/DirectEvents/Async/

    Please clarify do you still use Coolite v0.8? It is a bit out of date.

    We would highly recommend to upgrade to v1 or v2.
  3. #3

    Solved

    Thanks Dani - Its fixed my problem...please mark as solved.

    Yes the upgrade has been in the pipeline for over a year now...hopefully Ill get some time soon to complete this :)

Similar Threads

  1. Replies: 2
    Last Post: Feb 02, 2012, 5:30 AM
  2. Asynchronous DirectMethod
    By amitpareek in forum 1.x Legacy Premium Help
    Replies: 21
    Last Post: Sep 27, 2010, 4:26 PM
  3. Can't add AjaxMethod
    By glenh in forum 1.x Help
    Replies: 2
    Last Post: Apr 20, 2010, 10:00 PM
  4. Replies: 2
    Last Post: Jan 08, 2010, 2:47 AM
  5. AjaxMethod in VB.NET
    By r_honey in forum 1.x Help
    Replies: 3
    Last Post: May 10, 2009, 1:06 PM

Tags for this Thread

Posting Permissions