[Data Grid Reactive] Line breaks of header on specific position
Forge component by OutSystems R&D

I have been trying to break line of the header text by following this discussion.

What our client's requirement is to break the line at the specific position.
For example: If the header text is "This header is so big that needs to wrap", then after breaking to specific position the
header will be:

"This header
is so big
that needs
to wrap"

I have tried with <br>, "\n" etc and also set the isContentHtml to true.
I have also checked the grapecity discussion and tried to implemet.

But I could not break the text to specific position.



Is it possible to break the header text to specific position?



Hello @Blue Pearl ,

First of all, we can see that you've already been trying to use whatever has been suggested in another cases. 

In order to achieve your requirement, there is a solution but it has a cost regarding performance, because you will have to use the flexgrid event call formatItems, this runs whenever there is a change in the grid, a scroll, a click... and it runs for every visible cell:

You can try this, add <br/> where you need to break the column, but be aware of any performance loss:

In attachment, you can find a sample OML with this implementation.

Please keep in mind that this hasn't been tested for all possible use cases or that it cover all of your requirements, so we cannot assure that it will work for all use cases.

Please let us know if this helps.

Bruno Martinho


Thanks Bruno!
This helps what I wanted to achieve.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.