Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
149850 | Dec 11,2019 03:04 PM UTC | Dec 12,2019 08:55 AM UTC | Angular - EJ 2 | 1 |
![]() |
Tags: Grid |
@Component({
selector: 'app-root',
template: `<ejs-grid #batchgrid id='Batchgrid' [dataSource]='data' allowPaging='true' (beforeBatchSave)="beforeBatchSave($event)" [pageSettings]='pageSettings'
[editSettings]='editSettings' [toolbar]='toolbar'>
<e-columns>
<e-column field='OrderID' headerText='Order ID' width='120' textAlign='Right' isPrimaryKey='true' type="number"
[validationRules]='orderidrules'></e-column>
<e-column headerText='Order Details' [columns]='orderColumns'></e-column>
</e-columns>
</ejs-grid>`,
})
export class AppComponent {
public ngOnInit(): void {
this.orderColumns = [
{
field: 'Order.CustomerID',
headerText: 'Customer ID',
width: 130,
textAlign: 'Right',
type:"string"
},
{
field: 'Order.Freight',
headerText: 'Freight ($)',
width: 120,
format: 'C1',
textAlign: 'Right',
type: "number"
}
];
}
beforeBatchSave(args){
console.log(args.batchChanges.addedRecords[0]);
}
}
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.