Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Gabriel Crowe on Aug 26, 2008 15:03
open dhtmlx forum
Going completely mad with dhtmlxGrid 'Big grid'

I'm trying to integrate this grid into an application. Not being able to get it working is stopping my buying it for this project.

I'd love some help from the insanity, if you don't mind. ;o)

My grid loads on the page, and the first page of results appears. As i scroll downwards, the grid errors, with an 'invalid xml' and sometimes fails silently with an error in the Firebug console: 'responseXML is null'

I have found that the variable I use to hold the php url I use to generate the xml, is becoming blanked.

<div id="products_grid" style="width:100%;height:300px;"></div>
<script>
var mygrid = new dhtmlXGridObject('products_grid');
mygrid.setImagePath("resources/dhtmlxGrid/codebase/imgs/");
mygrid.setSkin("modern");
mygrid.init();
mygrid.enableSmartRendering(true);
        mygrid.preventIECaching(true);
        gridQString = "OrderListXML.php";
        mygrid.loadXML(gridQString);
</script>

after a few successful db pulls from my php file, for no apparent reason, the var (gridQString) becomes null and then the grid pulls data from '?posStart=653&count=5' etc. This effectively pulls data from 'index.php?posStart=653&count=3' and therefore obviously generates an error.

I have used the debug version of common.js to get this info, could you shed any light on why this would happen?

Is this a wierd bug?
Answer posted by Support on Aug 27, 2008 01:47
In srnd mode, after first loadXML call, the path used as parameter locked inside the grid as 
    grid.xmlFileUrl

when, during scrolling, new data will be necessary, grid will use such var as path to server side script. 

Normally, locked path value will not be reset until configuration of grid not changed.
Be sure that 
- clearAll command not used  - it will clear all data in grid and reset xmlFileUrl to empty value
- dynamically loaded  xml doesn't contain "head" section ( except of first chunk , which may contain such data ) , the head section will reset grid config and will clear used path

Just to be sure , latest version of dhtmlxgrid.js ( standard edition ) attached to post, it doesn't contain fix for exactly same issue, but still may help.

Attachments (1)