ng-grid showSelectionCheckbox

时间:2014-12-11 03:10:43

标签: angularjs ng-grid

如果取消选择一个项目,如何在showSelectionCheckbox中取消选择ng-grid

$scope.gridData;
$scope.gridOptions = {
    columnDefs: [
        { field: 'FullName', displayName: 'Full Name', width: 200, minWidth: 200 },
        { field: 'Roles', displayName: 'Role', width: 200, minWidth: 200 },
        { field: 'Email', displayName: 'Email', width: 225, minWidth: 200 }
        ],
        data: 'gridData',
        //enableColumnResize: true,
        selectWithCheckboxOnly: true,
        showSelectionCheckbox: true,
        checkboxCellTemplate: '<div class="ngSelectionCell" ng-class="Header"><input tabindex="-1" class="ngSelectionCheckbox" class="Header" type="checkbox" ng-checked="row.selected" /></div>',
        selectedItems: []
    };

1 个答案:

答案 0 :(得分:0)

你的gridOptions {}中的

添加multiSelect: false

在显示我误读了这个问题后更新:

在gridOptions.afterSelectionChange()函数中,您可以抓取第一列并将其可见性设置为false:

$scope.gridOptions.$gridScope.columns[0].visible = false;