jQuery MiniUI

标题: gird 格式问题 [打印本页]

作者: dapang    时间: 2012-12-10 15:21:10     标题: gird 格式问题

本帖最后由 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,x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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},{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();


结果:[attach]1071[/attach]

为什么会多出红圈的那一块?如何去掉?另外,我已经设置allowcelledit="true",allowcellselect="true",可是单元格无法编辑

作者: factory    时间: 2012-12-10 15:41:36

设置fitColumns为true试试
作者: dapang    时间: 2012-12-10 15:45:30

factory 发表于 2012-12-10 15:41
设置fitColumns为true试试

设置了,没有效果
作者: niko    时间: 2012-12-10 15:50:20

目前锁定列后,最右侧会有一点空白,目前没办法解决,影响也不大。
作者: dapang    时间: 2012-12-10 16:16:26

niko 发表于 2012-12-10 15:50
目前锁定列后,最右侧会有一点空白,目前没办法解决,影响也不大。

明白了,谢谢




欢迎光临 jQuery MiniUI (http://miniui.com/discuss/) Powered by Discuz! X2