datagrid正常加载数据,就是最后用 $("#tabview").datagrid('appendRow' 没有看到增加行的效果,请大神指点,以下是js的源码
var dgr = {};
var title = '';
var url = '';
var frozenCol = [];
var column = [];
var queryParamter = {};
init_table();
if(btn_type == "btn_ds") //地市追踪
{//表格定义
$("#btn").attr("onclick", "btn_click('btn_ds')");
title = '开门红地市业绩追踪(万元)';
url = 'ajaxgetdata.aspx';
queryParamter = { "busitype": "ds", "startDate": "2017-11-01", "endDate": a};
frozenCol = [[{ field: 'CITY_BRANCH_NAME', title: '机构', width: 80 }]];
column = [
[{ title: "目", colspan: 1 },
{ title: "预约", colspan: 1 },
{ title: "达成", colspan: 1 },
{ title: "预约", colspan: 1 },
{ title: "举绩", colspan: 1 },
{ title: "撤单", colspan: 1 },
{ title: "预约方式", colspan: 3 },
{ title: "三大平台", colspan: 3 },
{ title: "累计录单", colspan: 2 },
{ title: "今日录单", colspan: 2 },
{ title: "脱落", colspan: 2 }
],
[
{ field: 'KMH_YY', title: '标', width: 70,align:'center'},
{ field: 'PREM', title: '保费', width: 80, align: 'center' },
{ field: 'DCL', title: '率', width: 80, align: 'center' ,formatter: function (value, row, index) { if (row != null) { return '<span style="color:red;">' + value + '</span>' } } },
{ field: 'YYJS', title: '件数', width: 80, align: 'center' },
{ field: 'JJRL', title: '人力', width: 80, align: 'center' },
{ field: 'CD_PREM', title: '保费', width: 80, align: 'center' },
{ field: 'PREM1', title: '国寿e家', width: 70, align: 'center' },
{ field: 'PREM2', title: '万能账户', width: 80, align: 'center' },
{ field: 'PREM3', title: '安保基金', width: 80, align: 'center' },
{ field: 'PREMCQ', title: '城区', width: 90, align: 'center' },
{ field: 'PREMLX', title: '两乡', width: 95, align: 'center' },
{ field: 'PREMSZ', title: '收展', width: 95, align: 'center' },
{ field: 'LD_JS', title: '件数', width: 95, align: 'center' },
{ field: 'LD_PREM', title: '保费', width: 95, align: 'center' },
{ field: 'LDJT_JS', title: '件数', width: 95, align: 'center' },
{ field: 'LDJT_PREM', title: '保费', width: 95, align: 'center' },
{ field: 'TL_JS', title: '件数', width: 95, align: 'center' },
{ field: 'TL_PREM', title: '保费', width: 95, align: 'center' }
]
];
dgr.title = title;
dgr.queryParams = queryParamter;
dgr.url = url;
dgr.frozenColumns = frozenCol;
dgr.columns = column;
dgr.singleSelect = true;
$('#tabview').datagrid(dgr);
$("#tabview").datagrid('appendRow', {
KMH_YY:'1200'
});