Wrapping words in the ng-grid's header
Asked Answered
C

1

0

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

Consentaneous answered 16/6, 2014 at 10:23 Comment(0)
W
2

Just set the headerRowHeight in gridOptions:

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

Forked Plunker

Waziristan answered 16/6, 2014 at 11:41 Comment(1)
Simplicity is the ultimate of sophistication :) Thanks a lot!Consentaneous

© 2022 - 2024 — McMap. All rights reserved.