Need to combine the nestedHeader cell

Tags: #<Tag:0x00007f455c0963e0> #<Tag:0x00007f455c0961b0>

I want to achieve the following header

How can i do that

Hi @sauravhunny

You would need to use nestedHeaders, you can read more about it and find examples here:

yes I saw this example but I need to combine nestedHeaders as mentioned above image I shared, like “A” have colSpan = “2”, rowSpan=“2”

That would require to merge column headers from two rows, but something like this isn’t currently possible. Nested headers can only be set to span horizontally, not vertically.

okay got it, thanks.
I have one more problem where I need to add a custom class for example for nestedHeader “A”, is it possible?

Yes, you can attach custom class with help of afterGetColHeader hook:

Here’s an example:

1 Like

great it’s working, also how to handle the column widths, while I am using nestedColumns? we can pass an array to columnWidhts props but as we have a dynamic headers there is no point of generating “columnWidhts” array to pass.

You can do this by using manualColumnResize option:

Its functionality is limited while using with nested headers, but it still allows you to resize columns manually.