Get Free Trial

break line int title grid

douglasbergamo asked on November 8, 2020

Tem como colocar quebra de linha no titulo?, vide anexo.


1 answer

Mykhailo Halaida Mykhailo Halaida Flexmonster November 9, 2020

Hi Douglas,
Thank you for posting your question.
Currently, Flexmonster does not provide built-in functionality to insert line breaks in the title.
Nevertheless, this can be achieved with custom CSS configurations – please see the quick sample we’ve prepared:
In this sample, the following steps are taken :

  1. The grid title is initialized with an empty character (any string is possible here):
    options: {
    grid: {
    title: "\0"
  2. The inline-block value is specified for the display property of the title element through CSS to ensure the height of the title is adjusted properly, depending on the content:
    .fm-grid-title {
    display: inline-block;

    Please note that in the code snippet above the class selector . is used instead of the id # – that is because in version 2.8.16 many IDs were changed to the corresponding class names due to particular accessibility improvements. More on this here.

  3. A custom aftergriddraw event handler is added to insert a line break when the grid is ready:
    pivot.on('aftergriddraw', (e) => {
    document.querySelector('').innerHTML =
    'Lorem ipsum dolor sit amet, <br><span>consectetur adipiscing elit.</span>'

Please let us know if this helps.
Best regards,

This question is now closed