How to sum all quantity in table?

How to sum all quantity in table?

Lucaslopez12Lucaslopez12 Posts: 14Questions: 6Answers: 0
edited January 2022 in DataTables

hello. I have the following multi dimensional array.

what I want is for it to show me the total of QUANTITY that matches the same MARCA but I can't do it. I only add QUANTITY to DESCRIPTION


This is how I'm sending data to the table

I tried to change seller.description to seller.Marca but it still shows me the sum of the description and not the Marca. How can I do?


  • colincolin Posts: 14,705Questions: 1Answers: 2,510

    It looks like you've got colspan in the table body, which isn't supported. You might want to look at RowGroup, particularly this example, as it may be doing what you want.


  • kthorngrenkthorngren Posts: 18,217Questions: 25Answers: 4,323

    @Lucaslopez12 you are using the RowsGroup which is a third party plugin. This is using the colspan that Colin is referring to. Since its not something Datatables provides or supports you should mention you are using it in relevant threads :smile:

    This is how I'm sending data to the table

    Where are you using this code? The code snippet will be difficult to debug without seeing it run. Please provide a test case with an example of what you have so we can take a look.


Sign In or Register to comment.