Apply conditionalFormatSettings only to combination a column/row

Hi,

What I'm trying to achieve is to apply the conditional format only to the specific combination of a column and a row.

In this example I'm using the label field to apply the format only to the row named 'Cleaners' but, as you can see, it is applied to all the columns. I would like to have it only applied for 'FY 2015' combined with 'Cleaners' for example.

https://stackblitz.com/edit/conditionalformatsettings?file=app.component.ts

Is that possible?

thanks

1 Reply 1 reply marked as answer

MM Manikandan Murugesan Syncfusion Team May 20, 2021 10:31 AM UTC

Hi Ezequiel Bertran, 
 
The reported requirement couldn’t be achieved in conditional formatting but achieve in an event queryCellInfo. Please refer the following code example. 
Code Example: 
<ejs-pivotview 
#pivotview 
id="PivotView" 
(enginePopulated)="enginePopulated($event)" 
> 
</ejs-pivotview> 
 
 
queryCell(argsany): void { 
    (this.pivotObj.renderModule as any).rowCellBoundEvent(args); 
    if (args.cell.getAttribute('aria-colindex') && args.data[Number(args.cell.getAttribute('aria-colindex'))] && args.data[Number(args.cell.getAttribute('aria-colindex'))].axis === "value" && args.data[Number(args.cell.getAttribute('aria-colindex'))].actualText === "In_Stock" && args.data[Number(args.cell.getAttribute('aria-colindex'))].rowHeaders.indexOf("Cleaners") > 0 && args.data[Number(args.cell.getAttribute('aria-colindex'))].columnHeaders === "FY 2015") { 
      args.cell.classList.add('custom-class'); 
    } 
  } 
 
  enginePopulated(argsany): void { 
    this.pivotObj.grid.queryCellInfo = this.queryCell.bind(this); 
  } 
 
 
Meanwhile, we have modified your sample. 
 
Please let us know if you have any other queries. 
 
Regards, 
Manikandan. 


Marked as answer
Loader.
Up arrow icon