I edited plnkr: http://plnkr.co/edit/kdU59pZYQT0B76vYBQC8?p=preview .
I'm not sure if this is what you want to do, I used headerCellTemplate in the columnDefs object instead of headerTemplate, then you get access: {{col.colDef.showFile}}
columnDefs: [{ field: 'name', displayName: 'First Name', width: 90 }, { field: 'title', displayName: 'Last Name', width: 80 }, { field: 'test', displayName: 'test', width: 80, showFile: 'FILE', headerCellTemplate: '<div ng-class="{ \'sortable\': sortable }">' + '<div class="ui-grid-cell-contents" col-index="renderIndex" title="TOOLTIP">' + '<span>{{ col.displayName CUSTOM_FILTERS }}</span><br /><span>{{col.colDef.showFile}}</span>' + '<span ui-grid-visible="col.sort.direction" ng-class="{ \'ui-grid-icon-up-dir\': col.sort.direction == asc, \'ui-grid-icon-down-dir\': col.sort.direction == desc, \'ui-grid-icon-blank\': !col.sort.direction }">' + ' ' + '</span>' + '</div>' + '<div class="ui-grid-column-menu-button" ng-if="grid.options.enableColumnMenus && !col.isRowHeader && col.colDef.enableColumnMenu !== false" ng-click="toggleMenu($event)" ng-class="{\'ui-grid-column-menu-button-last-col\': isLastCol}">' + '<i class="ui-grid-icon-angle-down"> </i>' + '</div>' + '<div ui-grid-filter></div>' + '</div>' }
Stefano castriotta
source share