OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums 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 6 years, 7 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #36490

    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
    Replies
  • #36491

    ykasenka
    Participant

    Hello

    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:

    #36492

    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 ^^

    #36493

    ykasenka
    Participant

    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)

The forum ‘OroPlatform – How do I? Questions’ is closed to new topics and replies.

Back to top