<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);
var argsValue; // Global variable
export default {
data() {
return {
data: data
};
},
provide: {
grid: [Page]
},
methods: {
memberRowSelected: function(args) { // RowSelected event
argsValue = args; // Stored the rowSelected event aruguments in global variable
},
btnClick: function(e){
this.memberRowSelected(argsValue); // Passed the global variable value to rowSelected (i.e memberRowSelected) method
}
}
};
</script> |