I use a DHTMLX Grid with Smart rendering (buffer 50). It works fine.
Nevertheless I’m using a database with an important number of data (several millions), and I have to deal with performances issues
Each time, I launched a search, an HTTP request is send to server. I send two SQL requests, one to fetch the first 50 rows, and one other to count the total number of results. Then this results are sent back in JSon to the client-side.
The Select query is fast since it’s optimized. But the count(*) request takes much more time (up to 4 minutes). So in order to optimize all of this, I want to dissociate the two SQL queries in two HTTP requests. The first one will retrieve the first 50 rows, and the second one (running in background) will retrieve the total number of rows. This solution works, BUT I have trouble with the Smart Rendering, when the first query comes back (with the first 50 rows), the smart rendering initialize itself on this 50 rows, and when the second request comes back, the smart rendering do not update the vertical scroll, so it’s impossible to view more than the first 50 rows.
I wonder if there is a way to make the smart rendering works, with two requests instead of one.
Here my code:
// Here the two HTTP requests
p_mygrid.post(request, JSONtoURLString(parameters), function () {
p_mygrid.post(currentCountQueryUrl, JSONtoURLString(parameters),'json');
}, 'json');