Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
150457 | Jan 7,2020 10:05 PM UTC | Jan 8,2020 09:05 AM UTC | Angular - EJ 2 | 1 |
![]() |
Tags: Grid |
App.component.html
<ejs-grid [dataSource]='data' allowPaging='true' (actionComplete)='actionComplete($event)' [pageSettings]='pageSettings' [editSettings]='editSettings' [toolbar]='toolbar'>
<e-columns>
<e-column field='CustomerName' headerText='Customer Name' width='120' [validationRules]='customeridrules'></e-column>
. ..
</e-columns>
</ejs-grid>
|
App.component.ts
. . .
public ngOnInit(): void {
this.data = orderDetails;
this.editSettings = { allowEditing: true, allowAdding: true, allowDeleting: true, mode: 'Dialog' };
. ..
}
actionComplete (e) {
if (e.requestType === 'add') {
e.form.elements.namedItem('CustomerName').placeholder = 'Enter the Customer Name';
}
}
}
|
App.component.html
<div class="control-section">
<ejs-grid [dataSource]='data' allowPaging='true' [pageSettings]='pageSettings' [editSettings]='editSettings' [toolbar]='toolbar' (actionBegin)='actionBegin($event)'
(actionComplete)='actionComplete($event)'>
<ng-template #editSettingsTemplate let-data>
. . .
<div class="form-row">
<div class="form-group col-md-12">
<div class="e-float-input e-control-wrapper">
<textarea formControlName="ShipAddress" placeholder="Address should be in city/locality format" id="ShipAddress" name="ShipAddress" type="text"></textarea>
<span class="e-float-line"></span>
. . .
</ng-template>
</ejs-grid>
</div>
|
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.