View Full Version : [CLOSED] Delay firing of Direct Method ...

Apr 09, 2014, 10:09 PM
I have a gridpanel with a checkbox column.
When the checkbox is checked/unchecked, it fires an ajax call to update data using a handler...
The problem is that if a user runs down the list really quick, it fires a bunch of times...

The return of the direct method causes the entire grid to refresh...

Any good ideas? Any simple way?

I just want to be able to cancel a call, or not reload the grid if there is a pending call...

Does the "Delay" effectively cancel any previous calls? Or do they Q up and after a 5 second delay are you left with 10 calls that are going to fire?

This fires after each "check"

type: "POST",
url: "/Handler/BalanceSheetGridUpdateHandler.ashx",
data: JSON.stringify(arrChanges),
contentType: "application/json; charset=utf-8",
dataType: "json",
error: function (msg) {

scripts.messageTop('Error', msg.responseText, 'danger');
success: function (response) {

App.ContentPlaceHolder1_store.load(); <--this then reloads the entire grid...


The store is configured as such:

<ext:Store ID="store" runat="server" GroupField="GroupTitle">
<ext:AjaxProxy Json="true" Url="/Handler/PerformanceMetricsGridHandler.ashx">
<ActionMethods Read="POST" />
<ext:JsonReader Root="records" />
<ext:StoreParameter Name="metricType" Value="#{hidMetricType}.getValue()" Mode="Raw" />
<ext:StoreParameter Name="docId" Value="#{hidDocumentId}.getValue()" Mode="Raw" />
<Refresh Handler="footnoteCount=0;#{storeFootnotes}.load(); " />
<Load Handler="footnoteCount=0;#{storeFootnotes}.load();" />

Apr 10, 2014, 4:28 PM
Hi @rthiney,

It might be enough to use the Buffer setting for a listener which you use listen to check/uncheck events.