<div class="control-section">
<ejs-tooltip #tooltip id="tooltip" target=".e-headercell,.e-rowcell">
<ejs-treegrid [dataSource]='data' height='350' childMapping='subtasks' [treeColumnIndex]='1'
(mouseover)="tooltipValue($event)">
<e-columns>
………………………………….
</e-columns>
</ejs-treegrid>
</ejs-tooltip>
</div>
import { TooltipComponent} from '@syncfusion/ej2-angular-popups';
……………….
export class AppComponent {
…………
@ViewChild('tooltip', {static:true}) tooltipObj: TooltipComponent;
ngOnInit(): void {
…………..
}
tooltipValue(args) {
this.tooltipObj.content = "<b>test</b>: ok";
this.tooltipObj.animation = {
open: { effect: "FadeIn", duration: 0, delay: 0 },
close: { effect: "FadeOut", duration: 0, delay: 0 }
};
this.tooltipObj.openDelay = 0;
this.tooltipObj.closeDelay = 0;
this.tooltipObj.mouseTrail = true;
}
}
|
tooltipValue(args) {
let colData = args.target.innerText; // cell content
this.tooltipObj.content = colData;
---
} |
tooltipValue(args) {
let colData = args.target.innerText + "_" + "tooltip text";
// cell content + custom conent
this.tooltipObj.content = colData;
} |