Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
150419 | Jan 6,2020 07:16 PM UTC | Jan 7,2020 09:15 AM UTC | Vue | 1 |
![]() |
Tags: Data Grid |
App.vue
<template>
<div id="app">
<ejs-grid
id="Grid"
ref="grid"
:dataSource="data"
:allowPaging="true"
:editSettings="editSettings"
:load="load"
></ejs-grid>
</div>
</template>
<script>
import Vue from "vue";
import { GridPlugin, Edit, Page, Toolbar } from "@syncfusion/ej2-vue-grids";
import { data } from "./datasource";
Vue.use(GridPlugin);
export default {
data() {
return {
data: data,
editSettings: {
allowAdding: true,
allowEditing: true,
allowDeleting: true
},
toolbar: ["Add", "Edit", "Delete", "Update", "Cancel"]
};
},
methods: {
load: function() {
var colObj = { headerText: "Ship City", field: "ShipCity", width: 120 };
this.$refs.grid.ej2Instances.columns.push(colObj);
}
},
provide: {
grid: [Page, Edit, Toolbar]
}
};
</script>
<style>
@import "https://cdn.syncfusion.com/ej2/material.css";
</style> |
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.