Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
147054 | Aug 30,2019 08:21 AM UTC | Sep 5,2019 01:29 PM UTC | Vue | 4 |
![]() |
Tags: Data Grid |
[App.Vue]
<template>
<div id="app">
<ejs-button iconCss="e-icons e-play-icon" v-on:click.native="btnClick">Data Update</ejs-button>
<ejs-grid :dataSource="this.state.gridOrderData">
<e-columns>
. . . .
</e-columns>
</ejs-grid>
</div>
</template>
<script>
import Vue from "vue";
import { GridPlugin, Page } from "@syncfusion/ej2-vue-grids";
import { ButtonPlugin } from "@syncfusion/ej2-vue-buttons";
import { data } from "./datasource";
Vue.use(GridPlugin);
Vue.use(ButtonPlugin);
export default {
data() {
return {
state: {
gridOrderData: data
}
};
},
provide: {
grid: [Page]
},
methods: {
btnClick(args) {
// We can update Grid dataSource without Grid re-rendering using state property
this.state.gridOrderData = [
{
OrderID: 12121,
. . .
. . .
},
.. . .
. . .
];
}
}
};
</script> |
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.