actionComplete(args: any): void {
if (args.requestType === "add") {
args.rowData.sortOrder = this.mARCCustomTagsData.length + 1
args.form[3].parentElement.classList.remove('disablegrid');
args.form[3].parentElement.classList.remove('wrapper');
}
if (args.requestType === 'beginEdit') {
if (!args.rowData.otherFieldType) {
args.form[5].parentElement.classList.add('e-disabled');
}
else {
args.form[2].disabled = true;
args.form[2].parentElement.classList.add('e-disabled');
}
if (!args.rowData.constantType) {
args.form[3].parentElement.classList.add('disablegrid');
args.form[3].parentElement.classList.add('wrapper');
args.form[3].value = ''
}
else {
args.form[4].disabled = true;
args.form[4].parentElement.classList.add('e-disabled');
}
}
if (args.requestType == 'save') {
localStorage.removeItem(_custom_tag);
localStorage.removeItem(_is_edit_mode);
}
localStorage.setItem(_mARC_CustomTags_Data, JSON.stringify(this.mARCCustomTagsGrid.getCurrentViewRecords()));
this.mARCCustomTagsDataChange.emit(this.mARCCustomTagsGrid.getCurrentViewRecords() as MARCCustomTags[]);
}
actionBegin(args: any) {
if (args.requestType == 'refresh') {
localStorage.removeItem(_custom_tag);
localStorage.removeItem(_is_edit_mode);
}
if (args.requestType == 'beginEdit') {
localStorage.setItem(_custom_tag, args.primaryKeyValue);
localStorage.setItem(_is_edit_mode, 'true');
}
localStorage.setItem(_mARC_CustomTags_Data, JSON.stringify(this.mARCCustomTagsGrid.getCurrentViewRecords()));
if (args.requestType == 'save') {
let gridInstance: any = (<any>document.getElementById('mARCCustomTagsGrid')).ej2_instances[0];
args.index = (gridInstance.pageSettings.currentPage * gridInstance.pageSettings.pageSize) - 1;
}
}