Abort an ext js grid store ajax call

2020-07-30 02:02发布

问题:

I need to abort a EXT JS store load (which is a grid panel store using an ajax call).

I am using Ext JS 3.4

I have tried the following.

Ext.Ajax.abort(store.proxy.activeRequest);
delete store.proxy.activeRequest;

回答1:

This can be solved by giving a condition,

var activeRequest = store.proxy.activeRequest;

if (typeof activeRequest.read != 'undefined') 
{ 
    Ext.Ajax.abort(activeRequest.read); 
}