Trigger tooltip if column content have some conditions

Trigger tooltip if column content have some conditions

AlexanderLamasAlexanderLamas Posts: 58Questions: 1Answers: 0

Hi all,

Is it possible to show a tooltip for a column (cell) only if that column content have a specific condition?

NOTE: Condition would be like the length of the content.

If so, which event, or how I could inject the code to show the tooltip?

Thank very much in advance!

Regards,
Alex

Replies

  • kthorngrenkthorngren Posts: 21,140Questions: 26Answers: 4,918

    Use createdRow or createdCell to add the tooltip if the condition is met. Or if the data can change then use rowCallback.

    Kevin

  • AlexanderLamasAlexanderLamas Posts: 58Questions: 1Answers: 0

    Hi @kthorngren,

    Thank you very much for your reply.
    I think the createdRow or createdCell will definitely help me.

    Going a little further on this one, is it possible to detect, or to know if the text of a column has overflown?

    My intention is to show a tooltip only for a column when its contents have overflown.
    Any thoughts on that would be much appreciated.

    Thank you very much!

    Regards,
    Alex

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    You can't tell if it's over-flowed, but you could use something like this perhaps - the tooltip with ellipses.

    Colin

  • AlexanderLamasAlexanderLamas Posts: 58Questions: 1Answers: 0

    Hi @colin,

    Sorry for the late reply, and thank you very much for your feedback.
    I think the sample you mentioned in your link is quite useful.
    I will play with that and double check if it can work for my project.

    Thanks again!

    Regards,
    Alex

This discussion has been closed.