I am using Ag-grid and I need merge particular cells in a row.
How can I do this?
You can add this to your colDef for the particular column
cellClass: function(params) {
if(params.data.someConditionForCellsToBeMerged) {
return params.data.someConditionForCellToKeep ? "top-row-span": "bottom-row-span";
}
}
And then in your css:
.ag-neo .ag-cell.top-row-span {
border-bottom: 0px;
}
.ag-neo .ag-cell.bottom-row-span {
border-top: 0px;
text-indent: -100em; // you can use this to hide the content of the bottom cell
}