|
// Grid’s actionBegin event function
onActionBegin: function(args) {
if (args.requestType === "add") {
// Here you can get the addEventArgs
}
},
// Grid’s actionComplete event function
onActionComplete: function(args) {
if (args.requestType === "add") {
// Here you can get the addEventArgs
}
} |
|
// Grid’s toolbarClick event function
clickHandler: function(args) {
if (args.item.id === 'custom-save' && this.$refs.grid.ej2Instances.editModule.formObj) {
var newVal = [];
// Gets the input elements of the newly added row
var inputElements = this.$refs.grid.ej2Instances.editModule.formObj.inputElements;
// The value of each input element is stored with their field name in ‘newVal’ variable
inputElements.forEach(x => newVal[x.name] = x.value);
console.log("Added data: " + newVal) ;
}
} |