Skip to content

Commit

Permalink
PivotGrid: update the onCellPrepared property (T1171567) (#5210) (#5215)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergepilipchuk authored Jun 19, 2023
1 parent 185a88c commit 0690f77
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ This function allows you to customize cells and modify their content. Common use
$(function() {
$("#pivotGridContainer").dxPivotGrid({
// ...
onCellPrepared: function(e) {
if(e.cell.rowPath === "rowName" && e.cell.columnPath === "columnName") {
onCellPrepared: (e) => {
if(e.cell.rowPath && e.cell.rowPath[0] === "Africa" && e.cell.columnPath && e.cell.columnPath[0] === 2014) {
e.cellElement.css("font-size", "14px");
e.cellElement.css("font-weight", "bold");
}
Expand All @@ -72,7 +72,7 @@ This function allows you to customize cells and modify their content. Common use
})
export class AppComponent {
onCellPrepared(e) {
if(e.cell.rowPath === 'rowName' && e.cell.columnPath === 'columnName') {
if(e.cell.rowPath && e.cell.rowPath[0] === "Africa" && e.cell.columnPath && e.cell.columnPath[0] === 2014) {
e.cellElement.style.fontSize = '14px';
e.cellElement.style.fontWeight = 'bold';
}
Expand Down Expand Up @@ -117,7 +117,7 @@ This function allows you to customize cells and modify their content. Common use
},
methods: {
onCellPrepared(e) {
if(e.cell.rowPath === 'rowName' && e.cell.columnPath === 'columnName') {
if(e.cell.rowPath && e.cell.rowPath[0] === "Africa" && e.cell.columnPath && e.cell.columnPath[0] === 2014) {
e.cellElement.style.fontSize = '14px';
e.cellElement.style.fontWeight = 'bold';
}
Expand All @@ -135,7 +135,7 @@ This function allows you to customize cells and modify their content. Common use
export default function App() {
const customizeCells = useCallback((e) {
if(e.cell.rowPath === 'rowName' && e.cell.columnPath === 'columnName') {
if(e.cell.rowPath && e.cell.rowPath[0] === "Africa" && e.cell.columnPath && e.cell.columnPath[0] === 2014) {
e.cellElement.style.fontSize = '14px';
e.cellElement.style.fontWeight = 'bold';
}
Expand Down

0 comments on commit 0690f77

Please sign in to comment.