Posted 17 May 2019, 8:19 am EST
Hi
I’m using flexgrid in mvc web project with pure javascript.
Couldn’t find how to use showDelay and Title properties for tooltip.
Code working correctly.
Thank you
//tooltip event for cell
gridRole.hostElement.addEventListener('mousemove', function (e) {
let ht = gridRole.hitTest(e),
rng = null;
toolTip = new wijmo.Tooltip();
if (!ht.range.equals(rng)) {
if (ht.cellType == wijmo.grid.CellType.Cell) {
rng = ht.range;
if (rng.col === 0) {
let item = gridRole.rows[ht.row].dataItem;
let data = gridRole.getCellData(rng.row, rng.col, true),
//tipContent = '<b>Column ${rng.col} </b>: ${data} ',
tipContent = '<b>' + item.ROLE_NAME + '</b> <br />' + item.NOTE,
cellElement = document.elementFromPoint(e.clientX, e.clientY),
cellBounds = wijmo.Rect.fromBoundingRect(cellElement.getBoundingClientRect());
toolTip.show(gridRole.hostElement, tipContent, cellBounds);
//toolTip.showDelay = 1000;
//toolTip.Title = item.ROLE_NAME;
}
}
}
});
gridRole.hostElement.addEventListener('mouseout', function (e) {
toolTip.hide();
});