|
<e-column field="ShipCountry" headerText="Ship Country" width="150">
<ng-template let-data #template>
<ejs-dropdownlist
id="DefaultCard"
name="DefaultCard"
[dataSource]="shipCountryDistinctData"
[fields]="{text: 'ShipCountry', value: 'ShipCountry' }"
value="{{data.ShipCountry}}"
(change)="change($event)"
popupHeight="300px"
>
</ejs-dropdownlist>
</ng-template>
</e-column>
…………………………………..
change(e) {
this.grid.setCellValue(this.key, "ShipCountry", e.value);
} |
|
<e-columns>
<e-column field="OrderID" headerText="Order ID" width="120" isPrimaryKey="true" textAlign="Right"></e-column>
………………………..
App.component.ts
rowSelected(args) {
this.key = args.data.OrderID;
}
change(e) {
this.grid.setCellValue(this.key, "ShipCountry", e.value);
} |
|
<e-column field="ShipCountry" headerText="Ship Country" width="150">
<ng-template let-data #template>
<ejs-textbox value="{{data.ShipCountry}}" (blur)='change($event)'></ejs-textbox>
</ng-template>
</e-column>
……………………………………………….
rowSelected(args) {
let data = args.data;
console.log(data);
let f = this.grid.getPrimaryKeyFieldNames();
this.key = args.data[f];
}
change(e) {
this.grid.setCellValue(this.key, "ShipCountry", e.value);
} |