Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Ryan on Feb 13, 2009 07:57
open dhtmlx forum
dhtmlxGrid with xmlB format

Hello, I'm trying to use your dhtmlxGrid library with xmlB format XML, but so far to no avail.

This is a snippet of my code:

<div id="gridbox" style="width:600px; height:400px;"/>

<script type="text/javascript">
var incomeGrid = new dhtmlXGridObject('gridbox');
incomeGrid.imgURL = "js/dhtmlxGrid/imgs/";
incomeGrid.setColumnIds("total,revenue,expense");
incomeGrid.setHeader("Total, Revenues, Expenses");
incomeGrid.setInitWidths("*, 250,250");
incomeGrid.setColAlign("center,center,center");
incomeGrid.setColTypes("price,price,price");
incomeGrid.setColSorting("int,int,int");
incomeGrid.enableAlterCss("even", "uneven");
incomeGrid.init();
incomeGrid.load("xml/list.xml", "xmlB");
</script>

list.xml:

<?xml version='1.0' encoding='iso-8859-1'?>
<rows>
<row id="r1">
<total>300</total>
<!--revenues-->
<revenue>100</revenue>
<!--expenses-->
<expense>200</expense>
</row>
<row id="r2">
<total>500</total>
<!--revenues-->
<revenue>200</revenue>
<!--expenses-->
<expense>300</expense>
</row>
</rows>

When I load the page, Firebug throws this error:
that["_process_" + type] is not a function
at js/dhtmlxGrid/dhtmlxgrid.js
Line 2768

Also, when I try changing the loadXML to :
incomeGrid.loadXML("xml/list.xml", "xmlB");

this error is thrown:
call is not a function
at js/dhtmlxGrid/dhtmlxgrid.js
Line 2771

Can you please help? Thanks!
Answer posted by Support on Feb 13, 2009 09:27
Be sure that 
      codebase/dhtmlxgrid_data.js
included on the page. 
Attachments (1)