BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
@Component({
selector: 'app-container',
template: `<ejs-grid #grid [dataSource]='data' [height]='315' (queryCellInfo)='tooltip($event)' >
<e-columns>
<e-column field='OrderID' headerText='Order ID' textAlign='Right' width=90></e-column>
<e-column field='CustomerID' headerText='Customer ID' width=120></e-column>
<e-column field='Freight' headerText='Freight' textAlign='Right' format='C2' width=90></e-column>
<e-column field='ShipName' headerText='Ship Name' width=120></e-column>
</e-columns>
</ejs-grid>`
})
export class AppComponent implements OnInit {
public data: Object[];
ngOnInit(): void {
this.data = data;
}
tooltip(args: QueryCellInfoEventArgs){
// you can also add tooltip based on condition here
let tooltip: Tooltip = new Tooltip({
content: args.data[args.column.field].toString();
}, args.cell);
}
} |
Hi Shamil,Greetings from Syncfusion.Query : My requirement is to add Tooltip for that particular cell. How we can archive that?You can achieve your requirement by using the “queryCellInfo” event of Grid component. In that event you can add the custom Tooltip component for the cells based on your required conditions. Please refer to the below code example and documentation link for more information.
@Component({selector: 'app-container',template: `<ejs-grid #grid [dataSource]='data' [height]='315' (queryCellInfo)='tooltip($event)' ><e-columns><e-column field='OrderID' headerText='Order ID' textAlign='Right' width=90></e-column><e-column field='CustomerID' headerText='Customer ID' width=120></e-column><e-column field='Freight' headerText='Freight' textAlign='Right' format='C2' width=90></e-column><e-column field='ShipName' headerText='Ship Name' width=120></e-column></e-columns></ejs-grid>`})export class AppComponent implements OnInit {public data: Object[];ngOnInit(): void {this.data = data;}tooltip(args: QueryCellInfoEventArgs){// you can also add tooltip based on condition herelet tooltip: Tooltip = new Tooltip({content: args.data[args.column.field].toString();}, args.cell);}}Documentation: https://ej2.syncfusion.com/angular/documentation/grid/how-to/custom-tool-tip-for-columns/Regards,Pavithra S.