BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
new Vue({
el: '#app',
template: `
<div id="app">
<ejs-grid id="Grid" ref="grid" :allowPaging='true' :recordDoubleClick="recordDoubleClick" :dataSource="data" height='315px'>
<e-columns>
. . .
</e-columns>
</ejs-grid>
</div>
`,
data() {
return {
data: data.slice(0,20),
};
},
methods: {
recordDoubleClick: function(e) {
// you can show Dialog component here
alert("dblclick");
console.log(e);
}
});
|
[App.Vue]
<template>
<div id="app">
<ejs-grid
id="Grid"
ref="grid"
:recordDoubleClick="recordDoubleClick"
:rowSelected="singleClick"
:dataSource="data"
:allowPaging="true"
>
. . . .
</ejs-grid>
</div>
</template>
<script>
. . . .
Vue.use(GridPlugin);
window["timer"] =0;
window["isDoubleClick"] = false;
export default {
data() {
return {
data: data
};
},
provide: {
grid: [Page]
},
methods: {
recordDoubleClick: function(args) {
isDoubleClick = true;
},
singleClick: function(args) {
window.clearTimeout(timer);
var timer = setTimeout(
function() {
if (isDoubleClick) {
// you code here while double click action
} else {
this.prevDataFn.call(); // Call the prevDataFn function while we do a single click
}
isDoubleClick = false;
}.bind(this),1000);
selectedRecords.push(args.data);
},
prevDataFn: function() {
// you code here while single click action
}
}
}; |