Issue with Row Grouping and Custom Rendering in DataTables

Issue with Row Grouping and Custom Rendering in DataTables

BellalewisBellalewis Posts: 1Questions: 0Answers: 0
edited June 13 in Free community support

I’m currently working on a project where I need to implement row grouping with custom rendering in DataTables. My goal is to group data by a specific column and display additional information in the group header. However, I’m facing challenges with maintaining the correct format and ensuring that the grouping updates dynamically when the data is filtered. Specifically, I’m unsure how to integrate the rowGroup extension with custom HTML in the group headers. Could someone provide insights or examples on how to achieve this effectively? Any help would be greatly appreciated!

edited by Allan - removed probable spam link

Replies

  • kthorngrenkthorngren Posts: 22,034Questions: 26Answers: 5,082

    The link you provided doesn't have a Datatable test case that I can see. Maybe that wasn't the intention with the link. If there is a Datatable to look at then please post the steps to see it.

    I’m facing challenges with maintaining the correct format

    What format are you trying to keep?

    ensuring that the grouping updates dynamically when the data is filtered.

    Without seeing what you are doing its hard to say. I suspect you will need to use rows().every() with the selector-modifier of {search:'applied'} to iterate only the filtered grouped rows.

    Also the rows supplied for each group in rowGroup.startRender and rowGroup.endRender are only those displayed on the page. See this example from this thread for one way to get the data for all the rows in the group.

    If you still need help then please provide a simple test case with an example of what you are trying to do.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

  • allanallan Posts: 64,587Questions: 1Answers: 10,679 Site admin

    Happy to be proven wrong, but the link looks like spam. I've removed it.

Sign In or Register to comment.