smart rendering in the grid

Hi,
I’m working with JSON as grid source.
I have aspx page that generate the JSON structure.
So far so good.

Now im trying to implement the smart rendering.
i enable it :
mygrid.enableSmartRendering(true);

and the “load” method as i mentioned is getting the source from aspx file:

mygrid.load("GetResults.aspx?action=&iwfid=0&units=<%=units %>&dateState=enable&rowsQuick=<%=rowsPerPageQuickMode %>&smartRenderMode=<%=smartRenderMode %>&rowsNum=<%=rowsPerPage%> ",getResults(),“json”);

(actually it’s “select top 50000…”)

working great except one things : the data in grid is appear after more than 10 seconds when page load and i think it rendering all 50000 when page load.
any solution? as far as i understand all advatage of SR is that only several rows are rendering and datat from DB is getting when scrolling the grid.

thanks in advance

Elad

Do you have any code which iterate over all rows in grid?
If you are using 50000 rows in grid its better to use dynamic Smart rendering mode. docs.dhtmlx.com/doku.php?id=dhtm … ep_by_step

Yes.
I iterate all rows cause i need to make it json structure.

thanks.

This is cause of the problem. When you iterate over 50000 row each row is rendered which kills Smart Rendering performance.

so - can i combine the dynamic loading with JSON in order to solve the problem?
in the article u sent me i saw solution for XML generated by server side.
thanks in advance.

’ output data in XML format
Response.write("")
Do while not rs.EOF
Response.write("")
Response.write("")
etc etc

Yes, you can implement dynamic loading using JSON. In such case your server side should return valid JSON instead of XML

sorry for asking again but when inside the json string i put the “total_count” and the “pos” params?
it looks like this:

mygrid3.init();
var js={
rows:[
{ id:‘A1001’,
data:[
“1”,
“2”,
“3”,
“4”,
“5”],some:‘value’},
{ id:‘A1002’,
data:[
“1”,
“2”,
“3”,
“4”,
“5”]}
]}
mygrid3.parse(js,“json”);

thanks in advance

Hello,
you should add these parameteres (“total_count”, “pos”) right after the id parameter, before the data loading.
Look at this tutorial, please: http://docs.dhtmlx.com/doku.php?id=dhtmlxgrid:syntax_templates#json_format_details