Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
145555 | Jun 27,2019 07:46 PM UTC | Jun 28,2019 12:42 PM UTC | Angular - EJ 2 | 1 |
![]() |
Tags: Grid |
[app.component.html]
<ejs-grid #normalgrid id='Normalgrid' [dataSource]='data' allowPaging='true' [pageSettings]='pageSettings' [editSettings]='editSettings' [toolbar]='toolbar' (actionBegin)='actionBegin($event)'>
<e-columns>
<e-column field='OrderID' headerText='Order ID' width='140' textAlign='Right' isPrimaryKey='true' [validationRules]='orderidrules'></e-column>
---------------
</e-columns>
</ejs-grid>
---------------------------------------------------------------------------------------------------------------------
[app.component.ts]
export class AppComponent {
@ViewChild('ddsample')
public dropDown: DropDownListComponent;
public data: Object[];
public editSettings: Object;
public toolbar: string[];
public orderidrules: Object;
----
public ngOnInit(): void {
this.data = orderDataSource;
this.editSettings = { allowEditing: true, allowAdding: true, allowDeleting: true , newRowPosition: 'Top' };
this.toolbar = ['Add', 'Edit', 'Delete', 'Update', 'Cancel'];
this.orderidrules = { required: [true,'OrderID is required'], number: true };
-----
}
|
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.