public dataBound() {
if (this.grid) {
const columns: ColumnModel[] = this.grid.columns as ColumnModel[];
for (const col of columns) {
col.width = 120;
}
this.grid.refreshColumns();
}
} |
<div id="app">
<ejs-grid
id="Grid"
ref="grid"
:allowPaging="true"
:editSettings="editSettings"
:load="load"
:dataBound="dataBound"
></ejs-grid>
</div>
dataBound: function() {
this.$refs.grid.ej2Instances.autoFitColumns();
}
provide: {
grid: [Page, Edit, Toolbar, Resize]
} |