Wrapping words in the ng-grid's header

試著忘記壹切 提交于 2019-12-25 02:29:19

问题


I've got pretty long column titles in my ng-grid and trying to wrap words there. I've been dancing around custom 'headerCellTemplate' for some time and now words are wrapped, but I can't reach the adequate header height. I guess it coming from the 'overflow' CSS property, but all my efforts about it were failed.

Is there an easy way to wrap these words?

Here is the plunker: http://plnkr.co/edit/TnK8pl?p=preview


回答1:


Just set the headerRowHeight in gridOptions:

    $scope.gridOptions = { 
      data: 'myData', 
      enableRowSelection: false,
      columnDefs: 'gridColumns',
      headerRowHeight: 50
    };

Forked Plunker



来源:https://stackoverflow.com/questions/24241510/wrapping-words-in-the-ng-grids-header

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!