new Vue({
el: '#app',
template: `
<div id="app">
<ejs-button @click.native='update'>Update</ejs-button>
<ejs-grid :pageSettings="pageSettings" :allowPaging='true' ref="grid" :dataSource="data" >
<e-columns>
<e-column field='OrderID' headerText='Order ID' isPrimaryKey='true' textAlign='Right' width=90></e-column>
<e-column field='CustomerID' headerText='Customer ID' width=120></e-column>
<e-column field='Freight' headerText='Freight' textAlign='Right' format='C2' width=90></e-column>
</e-columns>
</ejs-grid>
</div>
`,
. . .
methods:{
update:function(args){
this.$refs.grid.$el.ej2_instances[0].dataSource[8].CustomerID = "Changed";
}
},
provide: {
grid: [Page]
}
}); |
paging:function(args){
if(this.$refs.grid.$el.ej2_instances[0].allowPaging){
this.$refs.grid.$el.ej2_instances[0].allowPaging = false;
}
else{
this.$refs.grid.$el.ej2_instances[0].allowPaging = true;
}
},
|