angular-ui-grid上下箭头不显示类型编号的列

时间:2016-10-31 14:42:24

标签: angular-ui-grid ui-grid column-defaults

当我将列类型设置为' number'时,它不会呈现默认的向上/向下箭头。它只允许直接文本编辑。是否有另一个网格选项覆盖它? "优先级"列是我的例子中的问题。

带上/下箭头的列:

enter image description here

我的专栏有问题:

enter image description here

HTML:

       <div ui-grid="gridRecipeRules" ui-grid-expandable ui-grid-edit ui-grid-row-edit ui-grid-auto-resize ui-grid-selection class="grid" ng-style="getRecipeRuleTableHeight()"></div>

JS:

 $scope.gridRecipeRules = {
        data: 'recipeRules',
        multiSelect: false,
        enableFiltering: true,
        enableSorting: true,
        enableRowHeaderSelection: false, // We don't want to have to click a row header to select a row. We want to just click the row itself.
        enableHorizontalScrollbar: uiGridConstants.scrollbars.WHEN_NEEDED,
        rowEditWaitInterval: -1,
        selectedItems: $scope.selectedRules,
        columnDefs: [{ name: 'Priority', displayName: 'Priority', type: 'number', width: '8%'},
                     { field: 'Description', displayName: 'Name', width: '50%', resizable: true },
                     { field: 'Derating', displayName: 'Derate', width: '14%', type: 'number' },
                     { field: 'AttributeCode', displayName: 'AndOr', width: '14%', resizable: true },
                     { field: 'StopProcessingOnMatch', displayName: 'Stop', width: '12%', type: 'boolean' }],
        expandableRowHeight: 300,
        expandableRowTemplate: '<h3 style="margin-top: 10px;">Rule Evaluations</h3>' +
                               '<div ui-grid="row.entity.ruleEvaluations" style=" float:left; height:200px;width:50%;" ui-grid-edit ui-grid-row-edit></div>' +
                               '<div ui-grid="row.entity.ruleActions" style="float:left; height:200px;width:30%;"  ui-grid-edit ui-grid-row-edit> </div> '
    };

0 个答案:

没有答案