BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
<button ejs-button (click)='handleClick($event)'>Clear Data</button>
<ejs-grid [dataSource]='data' (cellSave)="onsave($event)" [editSettings]='editSettings' [toolbar]='toolbar' [height]='150'>
<e-columns>
<e-column field='OrderID' headerText='ID' isPrimaryKey='true' width=150></e-column>
<e-column field='FoodName' headerText='Food Name' width=150></e-column>
<e-column field='Protein' headerText='Protein' textAlign='Right' width=120></e-column>
<e-column field='Fat' headerText='Fat' textAlign='Right' width=80></e-column>
<e-column field='Carbohydrate' headerText='Carbohydrate' textAlign='Right' width=120></e-column>
<e-column headerText='Calories Intake' textAlign='Right' [valueAccessor]='totalCalories' width=150></e-column>
</e-columns>
</ejs-grid>
…………………………………….
public totalCalories = (field: string, data: { Protein: number, Fat: number, Carbohydrate: number }, column: Object): number => {
return data.Protein * 4 + data.Fat * 9 + data.Carbohydrate * 4;
}
|