<template>
<div id="app">
<ejs-grid id="Grid" ref="grid" :height="400" :dataSource="data">
<e-columns>
<e-column field="Verified" headerText="Employee Image" type="boolean" width="150" textAlign="Center" displayAsCheckBox='true'></e-column>
...
</e-columns>
</ejs-grid>
</div>
</template>
<script>
...
</script> |
<template>
<div id="app">
<ejs-grid id="Grid" ref="grid" :height="400" :selectionSettings="selectionOptions" :allowPaging="true" :dataSource="data" :rowSelected="rowSelected" :rowDeselected="rowDeselected">
<e-columns>
<e-column field="Verified" type="checkbox" headerTemplate="<span>CheckBox</span>" width="50"></e-column>
...
</e-columns>
</ejs-grid>
</div>
</template>
<script>
...
export default {
data() {
return {
data: data,
selectionOptions: { persistSelection: true }
};
},
provide: {
grid: [Page]
},
methods: {
rowSelected: function(args){
if(args.target){
args.data.Verified=!args.data.Verified;
}
},
rowDeselected: function(args){
args.data[0].Verified=!args.data[0].Verified
}
}
};
</script> |