<template>
<div id="app">
<div id="test">
<ejs-grid
ref="grid"
:dataSource="data"
:cellSave="cellSave"
allowPaging="true"
>
<e-columns>
. . . . . . .
</e-columns>
</ejs-grid>
</div>
<!-- Render modal Dialog -->
<div>
<ejs-dialog
ref="modalDialog"
:isModal="isModal"
:header="header"
:width="width"
:content="teststr"
:animationSettings="animationSettings"
:overlayClick="overlayClick"
:created="created"
></ejs-dialog>
</div>
</div>
</template>
methods: {
cellSave: function(e) {
if (e.value.length >= 5) {
this.$refs.modalDialog.$el.ej2_instances[0].content =
"Your cell was saved";
this.$refs.modalDialog.show();
} else if (e.value.length < 5) {
this.$refs.modalDialog.$el.ej2_instances[0].content =
"Need atleast 5 letters";
this.$refs.modalDialog.show();
}
} |
cellSave: function(e) {
if (e.value.length >= 5) {
this.$refs.modalDialog.$el.ej2_instances[0].content =
"Your cell was saved";
this.$refs.modalDialog.show();
} else if (e.value.length < 5) {
this.$refs.modalDialog.$el.ej2_instances[0].content =
"Need atleast 5 letters";
this.$refs.modalDialog.show();
e.cancel = true;
}
} |