Created
June 28, 2013 18:47
-
-
Save telagraphic/5887048 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'm trying to show/hide some columns in ng-grid based on which user is viewing the page. | |
The visible property doesn't take a function which returns a true or false boolean? | |
I thought it would, but it does not. So then how would I hide/show based on certain conditions? | |
$scope.gridOptions = { | |
data: 'myData', | |
canSelectRows: false, | |
displaySelectionCheckbox: false, | |
footerRowHeight: 35, | |
showFooter: true, | |
showGroupPanel: true, | |
showColumnMenu: true, | |
showFilter: true, | |
enableColumnResize: true, | |
sortInfo: { fields: ['SignupDate'], directions: ['asc'] }, | |
columnDefs: [ | |
{ field: 'Account', displayName: 'Account Number', width: '160', visible: $scope.isUserAdmin() }, | |
{ field: 'LineOfBusiness', displayName: 'Commodity Type', width: '130' } | |
]//, | |
//plugins: [new ngGridCsvExportPlugin()] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment