如果取消选择一个项目,如何在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: []
};
答案 0 :(得分:0)
添加 multiSelect: false
在显示我误读了这个问题后更新:
在gridOptions.afterSelectionChange()函数中,您可以抓取第一列并将其可见性设置为false:
$scope.gridOptions.$gridScope.columns[0].visible = false;