Optional. A function which returns a template for the content of the tooltip
UsageâtooltipTemplate?: (cellValue, row: IRow, column: ICol) => string;
Parametersâ
The tooltipTemplate
function takes 3 parameters:
columns
config)Returning false from the function will block showing of the tooltip.
Exampleâconst grid = new dhx.Grid("grid_container", {
columns: [
{
id: "country", header: [{ text: "Country" }],
htmlEnable: true,
tooltipTemplate: (cellValue, row, col) => `<div className="custom-tooltip">
<img src="https://snippet.dhtmlx.com/codebase/data/common/img/02/${row.avatar}.jpg" />
<span>Last edit time:<br/>${row.editing.toUTCString()}</span>
</div>`
},
// more columns configuration objects
],
// more options
});
Related article: Adding template to tooltip
Related sample: Grid. Rich tooltip template for the first column
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4