Calling 'updateRow' method to update a row does not trigger the 'onLoadSuccess' event. When sorting the datagrid, the data will be sorted and re-loaded into the datagrid, the 'onLoadSuccess' event fires. You can use the 'onBeforeSortColumn' event to set a sorting flag that indicates the loading type.
$('#dg').datagrid({
remoteSort: false,
onBeforeSortColumn: function(){
$(this).datagrid('options').sorting = true;
},
onLoadSuccess: function(){
var opts = $(this).datagrid('options');
if (!opts.sorting){
console.log('normal loaded')
}
opts.sorting = false;
}
})