Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Denn on Feb 18, 2008 04:12
open dhtmlx forum
Dynamic load from table

I have a grid (GPL). I fill the grid from a table (invisible) on the grid page. The table has large number of rows (more than 1000). Grid in a circle fills with "addRow". It is too slow and a browser hand-up. Your samples for dynamic loading working with XML-file, as I meaning. How can I improve performance for this case?
Answer posted by Support on Feb 18, 2008 08:52
While performance of loading from HTML can be improved it will not allow to use such effective modes as "buffering" or "smart-rendering", both modes are XML centric, and can't be used with HTML table as source.

The best solution in you case output data directly as XML island on page, and use
    grid.parseXML(xml_island);

If you strictly limited to loading from HTML table, please contact us directly (support@dhtmlx.com) - we can provide some experimental extension, but it will increase loading speed not more than 2 times ( which most probably will  not be enough in your situation )
Answer posted by Denn on Feb 20, 2008 01:58
Here is xml island on my page? where is the grid:
<xml id='dataTable'>
        <rows total_count='1'>
            <row id='11489'>
                <cell>1</cell>
                <cell>AAAAA</cell>
                <cell>GGGGGg</cell>
            </row>
        </rows>
</xml>

Further attempts to load this island into grid:

1.   grid.parseXML(document.getElementById('dataTable'));
2.   grid.parseXML('dataTable');


rise an error in IE 7: "Object has no support this property or method" on grid source line:
...
"return docObj.selectNodes(xpathExp)"
...

How can I load xml island into the grid?
Answer posted by Support on Feb 20, 2008 05:40
Your code is correct, the second initialization
    grid.parseXML('dataTable');
must work fine.

Please check attached sample.
Attachments (1)
sample.zip674.00 B
Answer posted by Denn on Feb 21, 2008 01:49
You have using XMLHttpRequest object in grid's source code:
...
this.xmlDoc = new XMLHttpRequest();
...

I am using it too in my page. It is need for AJAX exchange with php server code. Therefore your variable xmlDoc don't init when I call parseXML().
What do you may offer in this situation?
Answer posted by Support on Feb 21, 2008 10:30
Actually this is must not cause any conflicts , the code is
    this.xmlDoc = new XMLHttpRequest();  
so code creates new instance of object, and it not related to any other instances of XMLHttpRequest

By the way, this branch of code use if you called with empty value, it must not be triggered, when you are loading data from XML island.

If problem still occurs for you - please send any kind of sample where it can be reconstructed to support@dhtmlx.com