日期:2014-05-16  浏览次数:20745 次

dhtmlx中的grid加载不了数据
本帖最后由 xujiawei0726 于 2012-11-21 16:21:34 编辑 我是一个初学者,求大神帮我看下这data为什么加载不了
<script type="text/javascript">
var data={rows:[{ "id":"1",data:["烟雾测试","金华尾气检测站","423cvhjj","1233676uvy894",08,"2011-1-1","2011-1-1","运行"]},
                { "id":"2",data:["烟雾测试","金华尾气检测站","423cvhjj","1233676uvy894",04,"2011-1-1","2011-1-1","运行"]},
                { "id":"3",data:["烟雾分析仪","义乌尾气检测站","423cvhjj","1233676uvy894",02,"2011-1-1","2011-1-1","运行"]},
                { "id":"4",data:["烟雾分析仪","永康尾气检测站","423cvhjj","1233676uvy894",05,"2011-1-1","2011-1-1","运行"]},
                { "id":"5",data:["烟雾测试","永康尾气检测站","423cvhjj","1233676uvy894",01,"2011-1-1","2011-1-1","故障"]},
                { "id":"6",data:["烟雾分析仪","义乌尾气检测站","423cvhjj","1233676uvy894",01,"2011-1-1","2011-1-1","故障"]},
                { "id":"7",data:["烟雾分析仪","武义尾气检测站","423cvhjj","1233676uvy894",03,"2011-1-1","2011-1-1","故障"]},
                { "id":"8",data:["烟雾测试","永康尾气检测站","423cvhjj","1233676uvy894",01,"2011-1-1","2011-1-1","故障"]},
                { "id":"9",data:["烟雾分析仪","义乌尾气检测站","423cvhjj","1233676uvy894",01,"2011-1-1","2011-1-1","故障"]},
                { "id":"10",data:["烟雾分析仪","武义尾气检测站","423cvhjj","1233676uvy894",03,"2011-1-1","2011-1-1","维护"]},
                { "id":"11",data:["烟雾测试","永康尾气检测站","423cvhjj","1233676uvy894",01,"2011-1-1","2011-1-1","维护"]},
                { "id":"12",data:["烟雾分析仪", "义乌尾气检测站","423cvhjj","1233676uvy894",01,"2011-1-1","2011-1-1","维护"]},
                { "id":"13",data:["烟雾分析仪","武义尾气检测站","423cvhjj","1233676uvy894",03,"2011-1-1","2011-1-1","故障"]},
                { "id":"14",data:["烟雾分析仪","义乌尾气检测站","423cvhjj","1233676uvy894",01,"2011-1-1","2011-1-1","故障"]},
                { "id":"15",data:["烟雾分析仪","武义尾气检测站","423cvhjj","1233676uvy894",03,"2011-1-1","2011-1-1","维护"]}
                ]};
$(function(){
renderGrid();
var t = new dhtmlXCalendarObject(["CAR_S_DATE","CAR_E_DATE","START_DATE","END_DATE"]);
});
 function renderGrid(){
  dhxGrid = new dhtmlXGridObject("grid_body");
  dhxGrid.setImagePath("${ctx}/plugin/dhtmlx/imgs/");
  dhxGrid.setSkin("dhx_skyblue");
  dhxGrid.setHeader("设备名称,站点名称,设备型号,设备类型,所属检测线,申请时间,标定有效期,状态");//设置头标题
  dhxGrid.setInitWidthsP("12,12,12,12,12,12,12,20");
  dhxGrid.setColAlign("center,center,center,center,center,center,center,center");
  dhxGrid.setColTypes("ro,ro,ro,ro,ro,ro,ro,ro");
  dhxGrid.setColSorting("str