Cancel / Reset Ajax request

2 posts, 0 answers
  1. Andy Green
    Andy Green avatar
    120 posts
    Member since:
    Jul 2009

    Posted 16 Jul 2010 Link to this post

    I have a page with a RadGrid, and a refresh button that calls a rebind method on the server. The grid gets its data through the needDataSource events.

    Thw page gets stuck and slows down if the refresh button is repeatedly clicked, is there a way to cancel the current ajax request and initiate a new one, or disable the button until the current ajax is completed.

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 16 Jul 2010 Link to this post


    Get reference to the button and disable the button in "requestStart" event, and re-enable it in "responseEnd" event. Initially access the button in code behind and save the ClientID in a HiddenField so that you can access the control from client side.

    Also, go through this help article: Disable controls during AJAX

  3. DevCraft R3 2016 release webinar banner
Back to Top