您也可以使用与其他属性相同的方法-只需从
柱
阵列:
<kendo-grid-column
*ngFor="let column of columns"
field="{{column.field}}"
title="{{column.title}}"
format="{{column.format}}"
filter="{{column.type}}"
width="{{column.width}}"
></kendo-grid-column>
public columns: ColumnSetting[] = [
{
field: 'ProductName',
title: 'Product Name',
type: 'text'
}, {
field: 'UnitPrice',
format: '{0:c}',
title: 'Unit Price',
type: 'numeric',
width: 300
}, {
field: 'FirstOrderedOn',
format: '{0:d}',
title: 'First Ordered',
type: 'date'
}
];
UPDATED EXAMPLE