|
<ejs-grid id="Grid" ref="grid" :dataSource="data">
<e-columns>
<e-column field="OrderID" headerText="Order ID"></e-column>
<e-column field="CustomerID" headerText="Customer ID" width="150"></e-column>
<e-column field="ShipCity" headerText="Ship City" width="130"></e-column>
<e-column field="ShipName" headerText="Ship Name" width="190"></e-column>
</e-columns>
</ejs-grid>
|
|
created() {
window.addEventListener("resize", args => {
if (args.target.innerWidth < 550) {
if (minum && this.$refs.grid) {
this.$refs.grid.ej2Instances.getColumns()[0].width = "80"; // you can apply width based on your requirement for that (width)auto column
this.$refs.grid.ej2Instances.refreshColumns();
minum = false; max= true;
}
} else {
if (max && this.$refs.grid) {
this.$refs.grid.ej2Instances.getColumns()[0].width = undefined;
this.$refs.grid.ej2Instances.refreshColumns();
max = false; minum = true;
}
}
});
}
|