sort:{direction:uiGridConstants.ASC} //正序
, sort: {direction: uiGridConstants.DESC //倒序
在指定列内加入sort进行排序
例如下面案例按照序号排序
$scope.gridOptions1 = {
enableGridMenu: false,
exporterMenuCsv: false,
enableCellEdit: false,
exporterOlderExcelCompatibility:true,//是否兼容低版本excel
exporterCsvFilename: '使用记录.csv',//excel导出名字
columnDefs: [
{
name: 'edit',
width: 250,
displayName: '操作',
fixed: true,
pinnedRight: false,
enableColumnMenu: false,
enableSorting: false,
cellTemplate: '<div class="ui-grid-cell-contents text-center publicBox">' +
'<button type="button" class="btn-xs btn blue btn-outline" data-ng-click="grid.appScope.checkDetail(row.entity)">