|
[app.component.html]
<ejs-grid [dataSource]='pGriddata' allowPaging='true' [pageSettings]='pageSettings'>
<e-columns>
<e-column field='OrderID' headerText='Order ID' width='120' textAlign='Right'></e-column>
<e-column field='CustomerName' headerText='Customer Name' width='150'>
<ng-template #template let-data>
<a rel='nofollow' rel='nofollow' href="#">{{data.CustomerName}}</a>
</ng-template>
</e-column>
<e-column field='OrderDate' headerText='Order Date' width='130' format="yMd" textAlign='Right'></e-column>
<e-column field='Freight' headerText='Freight' width='120' format='C2' textAlign='Right'></e-column>
<e-column field='ShippedDate' headerText='Shipped Date' width='130' format="yMd" textAlign='Right'></e-column>
<e-column field='ShipCountry' headerText='Ship Country' width='150'></e-column>
</e-columns>
</ejs-grid>
|
|
[app.component.ts]
queryCellInfo(args) {
if (args.column.field == "CustomerName") {
var aEle = document.createElement("a");
aEle.rel='nofollow' href = "ej2.syncfusion.com";
aEle.innerText = args.data["CustomerName"];
args.cell.innerText = "";
args.cell.appendChild(aEle);
}
} |