问题描述
列子:<divstyle='width:100%;text-align:right'><tableid='dg'border="1"></table></divvardata={"total":"1","columns":[[{"field":"ItemName","title":"费用类别","align":"center","rowspan":"2","width":200},{"title":"月实际收支情况","align":"center","colspan":"4"}//合并4列],[{"field":"ChangeDateTotal","title":"小计","align":"center","formatter":"Common.toThousands","width":100},{"field":"SJBalance","title":"实际(网银+现金)","align":"center","formatter":"Common.toThousands","width":100},{"field":"CDBalance","title":"承兑","align":"center","formatter":"Common.toThousands","width":100},{"field":"NBBalance","title":"内部交叉","align":"center","formatter":"Common.toThousands",}]],"rows":[{"ItemName":"收款合计""ChangeDateTotal":"0","SJBalance":"0","CDBalance":"0","NBBalance":"0"}]};$('#dg').datagrid({columns:data.columns}).datagrid("loadData",data);按照上面的写法,rows数据没法绑定到对用的列里面?怎么设置rows的格式才能绑定数据?急求
解决方案
解决方案二:
列子中最后一列多写了个逗号,去掉还是没有达到想要的结果