|
<div class="control-section diagram-complex-hierarchical-tree">
<ejs-tooltip #tooltip id="tooltip" (beforeRender)="beforeRender($event)" target=".e-rowcell.e-showtooltip">
<ejs-grid #grid [dataSource]="data" [editSettings]="editSettings" [toolbar]="toolbar" height="273px">
<e-columns>
<e-column field="CustomerID" [customAttributes]="{class: 'e-showtooltip'}" headerText="Customer ID" width="120"></e-column>
. . .
</e-column>
</e-columns>
</ejs-grid>
</ejs-tooltip> |
|
export class AppComponent implements OnInit {
public data: object[];
@ViewChild('grid', {static: true})
public grid : GridComponent;
@ViewChild('tooltip', {static: true})
public toolTip: TooltipComponent;
ngOnInit(): void {
this.data = data;
}
beforeRender (args) {
var data = this.grid.getRowInfo(args.target).rowData;
this.toolTip.content = data["CustomerID"];
}
} |
|
<div class="control-section diagram-complex-hierarchical-tree">
<ejs-tooltip #tooltip id="tooltip" (beforeRender)="beforeRender($event)" target=".e-rowcell.e-showtooltip">
<ejs-grid #grid [dataSource]="data" [editSettings]="editSettings" [toolbar]="toolbar" height="273px">
<e-columns>
<e-column field="OrderID" [customAttributes]="{class: 'e-showtooltip'}" headerText="Order ID" textAlign="Right" isPrimaryKey="true" width="100">
</e-column>
<e-column field="CustomerID" [customAttributes]="{class: 'e-showtooltip'}" headerText="Customer ID" width="120"></e-column>
<e-column field="Freight" [customAttributes]="{class: 'e-showtooltip'}" headerText="Freight" textAlign="Right" editType="numericedit" width="120"
format="C2"></e-column>
<e-column field="OrderDate" headerText="Order Date" type="date" format="yMd" [edit]="dpParams" width="150">
</e-column>
</e-columns>
</ejs-grid>
</ejs-tooltip> |
|
export class AppComponent implements OnInit {
public data: object[];
@ViewChild('grid', {static: true})
public grid : GridComponent;
@ViewChild('tooltip', {static: true})
public toolTip: TooltipComponent;
ngOnInit(): void {
this.data = data;
}
beforeRender (args) {
var rowInfo = this.grid.getRowInfo(args.target);
this.toolTip.content = rowInfo.rowData[rowInfo.column.field].toString();
}
} |