I found a bug using a method from 2015 to reset sorting.
If my emptyMsg is set to anything but "" then it returns it to "".
$.extend($.fn.datagrid.methods, {
resetSort: function (jq, param) {
return jq.each(function () {
var state = $.data(this, 'datagrid');
var opts = state.options;
var dc = state.dc;
var header = dc.header1.add(dc.header2);
header.find('div.datagrid-cell').removeClass('datagrid-sort-asc datagrid-sort-desc');
param = param || {};
opts.sortName = param.sortName;
opts.sortOrder = param.sortOrder || 'asc';
if (opts.sortName) {
var names = opts.sortName.split(',');
var orders = opts.sortOrder.split(',');
for (var i = 0; i < names.length; i++) {
var col = $(this).datagrid('getColumnOption', names[i]);
header.find('div.' + col.cellClass).addClass('datagrid-sort-' + orders[i]);
}
}
$(this).datagrid('reload');
})
}
});
After using this method also the emptyMsg doesn't disappear for datagrid view.