Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
144271 | Apr 28,2019 01:47 AM UTC | Apr 30,2019 10:52 AM UTC | Angular - EJ 2 | 4 |
![]() |
Tags: Grid |
@Component({
selector: 'app-root',
template: ` <ejs-grid [dataSource]='data' [editSettings]='editSettings'>
<e-columns>
<e-column field='CustomerID' headerText='Customer ID' width=150>
<ng-template #template let-data>
<span>{{data.CustomerID}}</span> // you can show the initial value like this.
<div style='width: 150px'>
<ejs-dropdownlist id='ddlelement' [dataSource]='dropData' ></ejs-dropdownlist>
</div>
</ng-template>
</e-column>
</e-columns>
</ejs-grid>`,
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
public data: object[];
public dropData: any;
public editSettings: EditSettingsModel;
ngOnInit(): void {
this.data = data;
this.dropData = ['VINET', 'TOMSP', 'HANAR', 'SUPRD', 'VICTE'];
this.editSettings = { allowEditing: true, allowDeleting: 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.