0

Is it possible in any way to change the header text when the size of the grid is too small to display it all? At this time I have it use an ellipsis when it's too small, but I would like to use different text (in this particular case the first two letters).

My columnDefs are as followed :

{
    field: 'HoursMonday',
    displayName: 'MONDAY',
    headerCellFilter:'translate',
    enableCellEdit: true,
    type: 'number',
    aggregationType: uiGridConstants.aggregationTypes.sum,
    footerCellTemplate: '<div class="ui-grid-cell-contents">{{col.getAggregationValue()}}</div>'
},

If the text doesn't fit in the header anymore, I would like to display Mo, Tu, Wed, etc.

I have these shorthands written down in my language files, so translations shouldn't be an issue.

Any thoughts? Thanks!

Billy
  • 1,104
  • 8
  • 22
  • If you want to display first 2 or 3 chars, then you can set the header cell css to `text-overflow: clip`. This way only first few chars will be displayed instead of ellpisis. If you want to display some other text completely then you might need to use other approach – Narendra CM Jun 01 '16 at 13:03
  • I don't want the text to cut-off half way a letter (which can happen with clip). I'll be waiting for that other approach, thanks for your suggestion. – Billy Jun 01 '16 at 13:18

0 Answers0