I want to change the color and text of the angular ui-grid header.
I want the background of the header to be black and the text to be white.
I don't want gradient or shading. I just want it black.
What CSS do I need to add?
This is pretty simple. Just add a headerCellClass for each column with your css.
$scope.gridOptions = {
enableSorting: true,
columnDefs: [
{ field: 'name', headerCellClass: 'white' },
{ field: 'company',headerCellClass:'white'}
],
onRegisterApi: function( gridApi ) {
$scope.gridApi = gridApi;
$scope.gridApi.core.on.sortChanged( $scope, function( grid, sort ) {
$scope.gridApi.core.notifyDataChange( uiGridConstants.dataChange.COLUMN );
})
}
};
here's a sample