var opts = $('#dg').datagrid('options');var name = opts.sortName;var order = opts.sortOrder;console.log(name+"|"+order);