BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
[remote-data.ts]
...
export class TemplateDrivenFormComponent implements OnInit {
public data: Object[];
public editSettings: Object;
public toolbar: string[];
public pageSettings: Object;
public shipCountryDistinctData: any;
public customerData: Object[];
public ngOnInit(): void {
this.data = orderDetails;
this.editSettings = { allowEditing: true, allowAdding: true, allowDeleting: true, mode: 'Normal' };
this.toolbar = ['Add', 'Edit', 'Delete', 'Update', 'Cancel'];
this.pageSettings = { pageCount: 5};
this.customerData = customerData;
this.shipCountryDistinctData = new DataManager({
url: 'https://services.odata.org/V4/Northwind/Northwind.svc/Orders/', //remote data
adaptor: new ODataV4Adaptor,
});
}
} |
[remote-data.ts]
<div class="control-section">
<ejs-grid [dataSource]='data' allowPaging='true' [pageSettings]='pageSettings' [editSettings]='editSettings' [toolbar]='toolbar'>
<e-columns>
<e-column field='OrderID' headerText='Order ID' width='120' textAlign='Right' [isPrimaryKey]='true'></e-column>
<e-column field='CustomerID' headerText='Customer Name' width='150'
foreignKeyValue='ContactName' foreignKeyField='CustomerID' [dataSource]='customerData'></e-column> //foreign key column
<e-column field='Freight' headerText='Freight' width='120' format='C2' textAlign='Right'></e-column>
<e-column field='OrderDate' headerText='Order Date' width='130' format='yMd' textAlign='Right'></e-column>
<e-column field='ShipCountry' headerText='Ship Country' width='150' editType='dropdownedit'></e-column>
</e-columns>
</ejs-grid>
</div> |