Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
145355 | Jun 18,2019 06:42 PM UTC | Jun 19,2019 01:06 PM UTC | Vue | 1 |
![]() |
Tags: Data Grid |
Component.vue excerpt:
methods: {
dataBound: function() {
for (var i = 0; i < this.$refs.grid.ej2Instances.columns.length; i++) {
if(this.$refs.grid.ej2Instances.columns[i].field === "OrderDate"){
this.$refs.grid.ej2Instances.columns[i].type="date";
}
if (this.$refs.grid.ej2Instances.columns[i].type === "date") {
this.$refs.grid.ej2Instances.columns[i].format = { type: "date", format: "dd/MM/yyyy" };
}
}
this.$refs.grid.ej2Instances.refreshColumns();
}}
package.json:
"dependencies": { "@syncfusion/ej2-vue-charts": "^17.1.51", "@syncfusion/ej2-vue-dropdowns": "^17.1.49", "@syncfusion/ej2-vue-grids": "^17.1.51", "axios": "^0.19.0", "bootstrap": "^4.3.1", "bootstrap-vue": "^2.0.0-rc.22", "core-js": "^2.6.5", "vue": "^2.6.10",
"vue-axios": "^2.1.4", "vue-router": "^3.0.3" }
<ejs-grid id="Grid" ref="grid" :dataSource="data" :allowPaging="true" :dataBound="dataBound">
<e-columns>
<e-column field="OrderID" headerText="Order ID" width="90"></e-column>
<e-column field="CustomerID" headerText="Customer ID" width="120"></e-column>
<e-column field="Freight" headerText="Freight" format="C2" width="90"></e-column>
<e-column field="ShipCity" headerText="Ship City" width="120"></e-column>
</e-columns>
</ejs-grid> |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.