// Grid’s headerCellInfo event function
headerCellInfo(args) {
if (args.cell.column.headerText === "LOAD COMPRESSOR" || args.cell.column.headerText === "POWER TURBINE") {
// Add a custom class to the required header column’s element
args.node.classList.add('custom-style');
}
}
<style>
// Override the border style for the custom class
.custom-style {
border-bottom: 0 !important;
}
</style> |
<style>
.custom-style {
border-bottom: 0 !important;
padding-top: 5vh !important;
}
</style> |
// Stacked header columns
this.LoadCompressorColumn = [
{
// Set custom css class to the empty header cell
customAttributes: { class: "merge-cell" },
columns: [
{
field: "COLUMN8_TEXT",
headerText: "ASS",
width: "60",
textAlign: "Center",
maxWidth: 60
},
{
field: "COLUMN9_TEXT",
headerText: "BAL",
width: "60",
textAlign: "Center",
maxWidth: 60
}
]
}
];
this.PowerTurbineColumn = [
{
// Set custom css class to the empty header cell
customAttributes: { class: "merge-cell" },
columns: [
{
field: "COLUMN10_TEXT",
headerText: "ASS",
width: "60",
textAlign: "Center",
maxWidth: 60
},
{
field: "COLUMN11_TEXT",
headerText: "RIV",
width: "60",
textAlign: "Center",
maxWidth: 60
},
{
field: "COLUMN12_TEXT",
headerText: "BAL",
width: "60",
textAlign: "Center",
maxWidth: 60
}
]
}
];
// Grid’s headerCellInfo event function
headerCellInfo(args) {
if (args.cell.column.headerText === "LOAD COMPRESSOR" || args.cell.column.headerText === "POWER TURBINE") {
// Add custom css class for aligning the header text
args.node.classList.add('custom-style');
// Merge cells to one
args.node.setAttribute("aria-rowspan", "2");
args.node.setAttribute("rowspan", "2");
}
} |
<style>
// Merge header cells
.merge-cell {
display: none
}
// Align header text
.custom-style {
padding-bottom: 30px !important;
}
</style> |