Can i use code like this? use [field]
|
<e-column [field]='name' headerText='Order ID' width='120'></e-column>
btnClick(args) {
(this as any).name = 'EmployeeID';
this.grid.refreshColumns();
} |
Thankyou very much, for the answer. Im using this method
Another Question, can you please watch the video? sorry for bad english
|
btnClick(args) {
if (this.grid.getColumnByField('CustomerName')) {
// get the column index
var index = this.grid.getColumnIndexByField('CustomerName');
if (index > -1) {
// replace the previous column with new column using its index position.
this.grid.columns[index] = {
field: 'ShipCity',
headerText: 'Ship City',
template: '<div>${ShipCity}</div>',
width: 150
};
// refresh the Grid to affect the changes in UI
this.grid.refreshColumns();
}
}
}
|