Author Topic: Hover text or tooltip on cell  (Read 1696 times)

mikep

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 163
    • View Profile
Hover text or tooltip on cell
« on: August 12, 2021, 06:25:50 pm »
I'm trying to add cell text, cell background color and hovertext to dynamic columns, by parsing a string. I'm not able to add the hovertext. Can the hovertext be added from the render function, similar to how I'm adding text and background color?
return { style: 'background-color:' + color, text: company, comment: hovertext }



https://jsfiddle.net/5mtx8uea/

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Hover text or tooltip on cell
« Reply #1 on: August 12, 2021, 10:38:34 pm »
hovertext is added as title attribute.

Code: [Select]
return {
          style: 'background-color:' + color,
          text: company,
          attr: 'title="'+ hovertext + '"'
}

mikep

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 163
    • View Profile
Re: Hover text or tooltip on cell
« Reply #2 on: August 13, 2021, 01:55:51 am »
Thank you, that works. Adding this attribute activated the trackModel and all cells appear dirty (adding the text didn't activate this, only the attribute). How can I disable trackModel before applying the attribute so cells are clean? Disregard, this  looks like the hover text indicator, which is nice to have.
« Last Edit: August 13, 2021, 02:11:05 am by mikep »