本帖最后由 dapang 于 2012-12-10 15:23 编辑
结构与数据如下:
[{xm1:9340,xm2:0,xm3:0,xm4:0,xm5:0,xm6:0,xm7:0,xm8:0,xm9:0,xm10:0,xm11:0,xm12:0,xm13:0},{xm1:7255,xm2:0,xm3:0,xm4:0,xm5:0,xm6:0,xm7:0,xm8:0,xm9:0,xm10:0,xm11:0,xm12:0,xm13:0},{xm1:0,xm2:0,xm3:0,xm4:0,xm5:0,xm6:0,xm7:0,xm8:0,xm9:0,xm10:0,xm11:0,xm12:0,xm13:0},{xm1:24200,xm2:0,xm3:0,xm4:0,xm5:0,xm6:0,xm7:0,xm8:0,xm9:0,xm10:0,xm11:0,xm12:0,xm13:0},{xm1:19700,xm2:0,xm3:0,xm4:0,xm5:0,xm6:0,xm7:0,xm8:0,xm9:0,xm10:0,xm11:0,xm12:0,xm13:0},{xm1:0,xm2:0,xm3:0,xm4:0,xm5:0,xm6:0,xm7:0,xm8:0,xm9:0,xm10:0,xm11:0,xm12:0,xm13:0},{xm1:7,xm2:0,xm3:0,xm4:0,xm5:0,xm6:0,xm7:0,xm8:0,xm9:0,xm10:0,xm11:0,xm12:0,xm13:0},{xm1:113200,xm2:0,xm3:0,xm4:0,xm5:0,xm6:0,xm7:0,xm8:0,xm9:0,xm10:0,xm11:0,xm12:0,xm13:0},{xm1:8700,xm2:0,xm3:0,xm4:0,xm5:0,xm6:0,xm7:0,xm8:0,xm9:0,xm10:0,xm11:0,xm12:0,xm13:0},{xm1:134200,xm2:0,xm3:0,xm4:0,xm5:0,xm6:0,xm7:0,xm8:0,xm9:0,xm10:0,xm11:0,xm12:0,xm13:0},{xm1:78000,xm2:0,xm3:0,xm4:0,xm5:0,xm6:0,xm7:0,xm8:0,xm9:0,xm10:0,xm11:0,xm12:0,xm13:0},{xm1:3065000,xm2:0,xm3:0,xm4:0,xm5:0,xm6:0,xm7:0,xm8:0,xm9:0,xm10:0,xm11:0,xm12:0,xm13:0},{xm1:169943,xm2:0,xm3:0,xm4:0,xm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3:0,xm4:0,xm5:0,xm6:0,xm7:0,xm8:0,xm9:0,xm10:0,xm11:0,xm12:0,xm13:0},{xm1:0,xm2:0,xm3:0,xm4:0,xm5:0,xm6:0,xm7:0,xm8:0,xm9:0,xm10:0,xm11:0,xm12:0,xm13:0},{xm1:0,xm2:0,xm3:0,xm4:0,xm5:0,xm6:0,xm7:0,xm8:0,xm9:0,xm10:0,xm11:0,xm12:0,xm13:0},{xm1:0,xm2:0,xm3:0,xm4:0,xm5:0,xm6:0,xm7:0,xm8:0,xm9:0,xm10:0,xm11:0,xm12:0,xm13:0},{xm1:0,xm2:0,xm3:0,xm4:0,xm5:0,xm6:0,xm7:0,xm8:0,xm9:0,xm10:0,xm11:0,xm12:0,xm13:0},{xm1:0,xm2:0,xm3:0,xm4:0,xm5:0,xm6:0,xm7:0,xm8:0,xm9:0,xm10:0,xm11:0,xm12:0,xm13:0}]
var columns = [{ "field": "xm0", "width": "100", "headerAlign": "center", "header": "项目" }, { "field": "xm1", "width": "100", "headerAlign": "center", "header": "年计划" }, { "field": "xm2", "width": "100", "headerAlign": "center", "header": "一月" }, { "field": "xm3", "width": "100", "headerAlign": "center", "header": "二月" }, { "field": "xm4", "width": "100", "headerAlign": "center", "header": "三月" }, { "field": "xm5", "width": "100", "headerAlign": "center", "header": "四月" }, { "field": "xm6", "width": "100", "headerAlign": "center", "header": "五月" }, { "field": "xm7", "width": "100", "headerAlign": "center", "header": "六月" }, { "field": "xm8", "width": "100", "headerAlign": "center", "header": "七月" }, { "field": "xm9", "width": "100", "headerAlign": "center", "header": "八月" }, { "field": "xm10", "width": "100", "headerAlign": "center", "header": "九月" }, { "field": "xm11", "width": "100", "headerAlign": "center", "header": "十月" }, { "field": "xm12", "width": "100", "headerAlign": "center", "header": "十一月" }, { "field": "xm13", "width": "100", "headerAlign": "center", "header": "十二月"}];
grid.setColumns(columns);
grid.reload();
结果:
为什么会多出红圈的那一块?如何去掉?另外,我已经设置allowcelledit="true",allowcellselect="true",可是单元格无法编辑
|