DataGrid 分组(表格子数据),定义工具栏(toolbar)"新增"时设置index 为0不起作用

提问 未结 0 2683
悬赏:20飞吻
groupField: 'Code',
view: groupview,
groupFormatter: function (value, rows) {
return rows.Type;
},
toolbar:
[
id:"add",
text:"新增",
iconCls:"icon-add",
handler:function(){
$('#dg').datagrid('insertRow', { index: 0, row:dataObj } );
}
]

设置index为0,但是实际新增后新增的数据在本页数据的最后一条,并不是设置的index,
不加分组新增的操作没问题,不知道有什么办法可以解决,让新增的那条定位在第一行
回帖
回帖须知