Smart Render grid filter problem.

I’m trying to make an filter function for a smart render grid.

To load the ajax request it takes sometimes 2 or 3 seconds, becease of the complexibility of the query I use.



The filter works but that’s it.

If i’m filtering on multiple fields, the grid runs multiple ajax requests at one time and waits! until all the requests are loaded.

So this takes a while (10 secends and up) befor i see any result.



By searching on the knowledge base, I found a solution: mygrid.xmlLoader.xmlDoc.abort() ;

But if i’m using it, it gives me a LOAD XML error back as an alert.



How can I fix this so i don’t get this error’s or the grid doesn’t runs multiple ajax requests at one time (only the latest )?

And is there a propper way to block the loading if the filter isn’t changed sinds the last time?





attachEvent(“onFilterStart”,function(a,b){

bString = b;

if((filterBlock[0] == bString[0]) && (filterBlock[1] == bString[1]) && (filterBlock[2] == bString[2]) && (filterBlock[3] == bString[3]) && (filterBlock[4] == bString[4])){ return true;}

myTable.xmlLoader.xmlDoc.abort();

filterBlock = bString;

myTable.clearAll();

url = gridQString+’&b[0]=’+b[0]+’&b[1]=’+b[1]+’&b[2]=’+b[2]+’&b[3]=’+b[3]+’&b[4]=’+b[4];

myTable.loadXML(url);

return false;

});

You can catch incorrect xml error using:
dhtmlxError.catchError(“LoadXML”, myErrorHandler);
function myErrorHandler(type, desc, erData){

return false;
}
After that alert will not appear

Is there a better way get this big amount of records and to search in the amount of records by the head filter, or is this the only way to do this with dhtmlx?

You can try to use dhtmlxConnectors extension which can help you implement dynamic loading, server side filtering and searching. Please see more information here dhtmlx.com/docs/products/dht … ndex.shtml