columnHeaders extra row with existing nested columns

Posted by: amakarenko on 7 April 2021, 9:34 am EST

    • Post Options:
    • Link

    Posted 7 April 2021, 9:34 am EST

    Hello.

    I would like to add an extra row to the columnHeaders to display some static meta information (artificially create extra headers).

    I tried other examples listed on this forum and here is the closest I got:

    https://stackblitz.com/edit/js-fvmqz2?file=index.js

    The row is added, but it is blank. Notably, when traversing within grid.formatItem.addHandler, only the original rows #0 and #1 are present. Where is row #2 and how can I access it?

  • Posted 7 April 2021, 7:53 pm EST

    Hi,

    We are able to replicate the issue at our end and hence we have forwarded it to the concerned team for further investigation of the issue(Internal tracking Id: WJM-19668).

    Till then you may work around the issue by using AllowMerging property to merge headers as demonstrated in the following sample:

    https://stackblitz.com/edit/js-srdeu2?file=index.js

    Regards

    Sharad

  • Posted 9 April 2021, 12:21 am EST

    Hi Sharad -

    I tried your approach with merging - it worked on the contrived example (as shared above), but when I attempted to port it to my real app, I still faced similar issues (could be interaction with other formatItem handlers).

    Unfortunately I cannot share source code of the real app, so I’d like to wait until a fix is released for the nested columns approach (I will keep watching this thread).

  • Posted 11 April 2021, 5:11 pm EST

    Thank you for the feedback. I’ll keep this thread updated with the updates.

    You could also try another approach of adding the row as a normal data row and setting the frozenRows to 1 to fix it at the top position to fix it at the top just like header rows. The following sample demonstrates the same:

    https://stackblitz.com/edit/js-sqcv9f?file=index.js

    Let me know if this works for you.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels