Covering OroCRM topics, including community updates and company announcements.  Subscribe

Forums OroPlatform OroPlatform – How do I? Questions Grids: long strings in cells, how to truncate and add tooltips

This topic contains 3 replies, has 2 voices, and was last updated by ykasenka ykasenka 6 months ago.

  • Creator
  • #62908

    Hi everybody,

    is there any nice way how to configure datagrid so that in case there is a too long string in a cell then oro will concat it and add a tolltip in the same way hot it is done fot datagrid headers?

    Would not like to defile a twig template for each column where the value to be truncated and the whole value to be added as a title in order to become a tooltip with the help of some js code, would rather prefer to have a nice setting for it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
  • #62909


    For now autotruncate for grid cells are not supported, but 1) you can create you own formatter and use it for truncate fields 2) or extend FieldPropery 3) or just use one twig template for all needed fields.

    Formatter example

    register service and put you own code like that:

    next update datagrid configuration like that:

    Extend FieldPropery example

    create you custom property:

    decorate default formatter:

    and add “truncate” property to grid configuration:


    Thanks, @ykasenka,

    unfortunately these solutions won’t work for me. The main issue why I need this is the responsibe design, so I need values in cell to be truncated depending on cell width but not the count of chars… Hope in future releases this feature will be added ^^


    Thanks @aliaksandra.chyrkova for your questions

    If you want it feature in next releases, please create issue on official github repository.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.