Showing changing realtime data
Hi
i saw that the grid there is dynamically changing the data , how can i accomplish this
i am not using the data manager , the local data is being updated/pushed to vuex store
Best Regards
Hani
SIGN IN To post a reply.
4 Replies
HY
Hani Yasin
September 3, 2019 03:18 AM UTC
any update?
MS
Manivel Sellamuthu
Syncfusion Team
September 3, 2019 01:46 PM UTC
Hi Hani ,
Thanks for contacting Syncfusion support.
You can externally binding Grid component dataSource without DataManager by using custom data binding concept. Please find the demo and documentation for your reference.
Documentation : https://ej2.syncfusion.com/vue/documentation/grid/data-binding/?no-cache=1#custom-binding
Regards,
Manivel
HY
Hani Yasin
September 4, 2019 03:57 AM UTC
Hi
i do not want to do external binding, i want to detect datasource values changes and reflect that on the grid without re-rendering if possible
SS
Seeni Sakthi Kumar Seeni Raj
Syncfusion Team
September 5, 2019 01:29 PM UTC
Hi Hani,
We can achieve your requirement using state property in Vue.
To change the data to the Grid dynamically, using the vue state and dataSource onProperty change. Refer to the following code example.
|
[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> |
Regards,
Seeni Sakthi Kumar S
SIGN IN To post a reply.
- 4 Replies
- 3 Participants
-
HY Hani Yasin
- Aug 30, 2019 08:21 AM UTC
- Sep 5, 2019 01:29 PM UTC