Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
149365 | Nov 22,2019 10:19 PM UTC | Nov 26,2019 06:14 AM UTC | Angular - EJ 2 | 3 |
![]() |
Tags: Grid |
<ejs-grid #grid [dataSource]='data' [allowPaging]='true' [pageSettings]="pageSettings" [allowFiltering]='true'
[filterSettings]="filterSettings" [editSettings]='editOptions' [toolbar]='toolbarItems' [allowSorting]='true'>
<e-columns>
<e-column field='OrderID' headerText='Order ID' width='120' textAlign='Right' [validationRules]='orderidrules'
isPrimaryKey='true'></e-column>
<e-column field='CustomerID' headerText='Customer Name' width='250' foreignKeyValue='ContactName'
foreignKeyField='CustomerID' [edit]='dpParams' editType='dropdownedit' [dataSource]='customerData'></e-column>
</e-columns>
</ejs-grid>
|
export class AppComponent {
public ngOnInit(): void {
. . . . .
this.dpParams = { params:{
// you can customize the template based on your requirement
itemTemplate: '<div><img class="empImage" src="https://ej2.syncfusion.com/demos/src/grid/images/1.png" alt="employee"/>' + '<div class="ename"> ${ContactName} </div></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.