let index: number = 0;
public selectedCells: string[] = [];
drillThrough(args): void {
if (args.currentCell.axis === 'value') {
args.currentTarget.innerHTML = '<input type="text" class="e-input e-pivot-cell-edit" maxlength="10"></input>';
this.rowIndex = args.currentCell.rowIndex;
this.columnIndex = args.currentCell.colIndex;
this.pivotObj.grid.queryCellInfo = this.queryCell.bind(this);
this.selectedCells[index] = this.columnIndex + "_" + this.rowIndex;
index++;
args.currentTarget.querySelector('input').addEventListener('focusout', (event) => this.onFocusOut(args));
this.previousArgs = args;
this.previousValue = args.currentCell.value;
}
}
queryCell(args: any): void {
(this.pivotObj.renderModule as any).rowCellBoundEvent(args);
if (this.selectedCells.length > 0) {
for (var i = 0; i < this.selectedCells.length; i++) {
if (args.cell && JSON.parse(args.cell.getAttribute('aria-colIndex')) == this.selectedCells[i].split("_")[0] && JSON.parse(args.cell.getAttribute('index')) == this.selectedCells[i].split("_")[1]) {
// Here you can apply any styles to the specified class in app.component.css file.
args.cell.classList.add('selectedCell')
}
}
}
}
|