UI-GRID标头-更改颜色和文本 [英] UI-GRID header - Change Color And Text
本文介绍了UI-GRID标头-更改颜色和文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想更改ui-grid角形标题的颜色和文本.
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.
我需要添加什么CSS?
What CSS do I need to add?
推荐答案
这很简单.只需在CSS中为每列添加headerCellClass.
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 );
})
}
};
这是一个示例
http://plnkr.co/edit/DKi9nSMbI3PG1u8lcHDE?p=preview
这篇关于UI-GRID标头-更改颜色和文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文