Hi,
I’ve been evaluating your product last days and I created a sortable grid based on an XML file. Now I am wondering about another situation. For example I am accessing a page using Ajax that returns the content in XML format and stored in the responseXML property of my Ajax request object.
Is it possible to directly create a grid table based on the content in responseXML object of the Ajax request object?
In this case there is no XML file storage XML content will be created by the server-side as and when there is a client request.
Please give me more information about this kind of transactions.
Thanks in advance
Jones
The grid can use xmlHttpRequest object with XML response as datasource
grid.parseXML(my_object);
Please beware that such init may not work correctly for paging and smart-rendering modes.
>>In this case there is no XML file storage XML content will be created by the server-side
The default grid.loadXML(… operation, doesn’t require that target must be a static XML file, it can be any server-side script which generates valid XML response
Just confirmed that parseXML(myDomObject) breaks smart rendering.
I would just like to add that it would be great if parseXML(my_object) supported smart rendering. It seems there’s no reason why not. LoadXML from a file, loads the entire xml and then does it’s work, why can’t parseXML(my_object) do that same thing?
Currently the loadXML used as main data loading routine, the parseXML is only parser part without any relation to other grid’s logic, its ability to load directly from XML object just a documented side effect, not the prime functionality, it will not work in dynamically loading modes ( it will work for initial loading, but all subsequent loading attempts will be run through native loadXML routine )
In case of smart Rendering - the logic build in such way that grid logic itself initiate loading when necessary, so there is not way to use parseXML in such circumstances.
Ok. This makes sense. Here is the work around that your support guys sent me via email, which seems to only work in the latest release:
//load it in Smart Render mode
var loader = new dtmlXMLLoaderObject();
loader.xmlDoc=this.XMLContent;
grid._dl_start=[[0,grid._dloadSize]];
grid._askRealRows2(grid,loader,null,null,loader);