My grid refuses to load this xml into my grid and I cannot figure out why… I’m getting the message:
error type: loadXML
description: Incorrect XML
The xml is loaded into a textarea on the page when it loads and the grid takes it from there.
(see attatched file “capture.png”)
Here is the javascript for the grid:
var init_data = document.getElementById(‘grid_init_data’).innerHTML.replace(/</gi, ‘<’).replace(/>/gi, ‘>’).replace(/"/gi, ‘"’);
alert(init_data);
mygrid = new dhtmlXGridObject(‘gridbox’);
mygrid.setImagePath(‘dhtmlxGrid/codebase/imgs/’);
mygrid.setHeader(“SalesOrderDetailId, ProductNumber, ProductName, UnitPrice, Quantity, TotalAmount”);
mygrid.attachHeader(" ,#text_filter,#text_filter, , , ")
mygrid.setInitWidths(“150,150,200,100,100,100”)
mygrid.setColTypes(“edtxt,edtxt,edtxt,edtxt,edtxt,edtxt”);
mygrid.setSkin(“modern”);
mygrid.setColSorting(“str,str,str,str,str,str”);
mygrid.setColAlign(“left,left,left,left,left,left”);
mygrid.init();
mygrid.loadXML(init_data);
Any ideas why this isn’t working would be much appreciated…
/Aidal