Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Ramesh on Oct 30, 2009 00:23
open dhtmlx forum
No auto update in smart rendering mode

Hi,

Im using dhtmlxGrid_v25_pro_90904-EVAL version. Here is my code to display grid in smart rendering mode:

mygrid = new dhtmlXGridObject("workspace");
    mygrid.setImagePath(URL_DHTMLX+"codebase/imgs/");
    mygrid.setHeader(labels);
    mygrid.setInitWidths(widths);
    
    mygrid.init();
    mygrid.setSkin("dhx_skyblue");
    mygrid.enableSmartRendering(true);
    
    
    var params = ""test="+xzz;
    mygrid.load("GetDwJson.jsp?"+params, "json");

The problem is

1. I don't see "posStart" and "count" parameters in the request.
2. Though the JSON response includes proper headers with "total_count" and "pos" the grid behaves as if it is loaded with static datasource. i.e it is not making any new request to update it with new set of rows, even the scrollbar ends with first set of rows.

Plz let me know if im missing anything in the grid configuration.

Thanks!
Answer posted by dhxSupport on Oct 30, 2009 02:38
Please check if you have included dhtmlxgrid_json.js file to your page.
Answer posted by Ramesh on Oct 30, 2009 03:27

I have included the dhtmlxgrid_json.js file now but then no effect. I have also tried with loading XML instead JSON it is also not working.

XML loaded:

 <?xml version="1.0" encoding="UTF-8" ?>
 <rows totalcount="247" pos="0">
 <row id="1">
  <cell>65280</cell>
  <cell>2006 100267 000 00 B1</cell>
  <cell />
  <cell>2006-02-02 14:54:08</cell>
  </row>
 <row id="2">
  <cell>65280</cell>
  <cell>2006 100279 000 00 B1</cell>
  <cell />
  <cell>2006-02-06 11:43:23</cell>
  </row>
</rows>

Answer posted by dhxSupport on Oct 30, 2009 03:32
Please try to download beta version of dhtmlxConnectors for Java http://dhtmlx.com/docs/download/dhtmlxConnector_java.zip. It has examples of dynamic smart rendering. 
Dynamic smart rendering tutorial is available here http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxgrid:toc_dhtmlxgrid_step_by_step
http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxconnector:toc
Answer posted by Stanislav (support) on Oct 30, 2009 05:42
 <rows totalcount="247" pos="0">
must be a
 <rows total_count="247" pos="0">
Answer posted by Ramesh on Oct 30, 2009 09:34
Yeah that solves the problem with XML!