how can i show my custom emptyText in the datagrid body,when the remote data.tatal = 0. I try it in the onLoadSuccess callback then appendRow and mergeCells but it seems no good, the gridheader columns will be merge too. the core like below:
onLoadSuccess:function (response) {
if (!response.total) {
$(selector).datagrid('appendRow',{
'fieldName':'emptyText'
}).datagrid('mergeCells',{
index: 0,
field: $(selector).datagrid('getColumnFields')[0],
colspan: $(selector).datagrid('getColumnFields').length
})
}
}
ps: i hope it can be setting options like {emptyText:'no data!'}
EasyUI