Add a row manually in CDataTable

Hi,

I currently get all the data from the database and populate on the CDataTable. For e.g. if i need to add the sum of sales amount column and show the Total sales amount in a new row is there a way to add a row manually to CDatatable? Below screen shot will make the question more clearer I suppose

image

Use push({‘column’: ‘data’}) after receiving table data:
self.items = response.data; self.items.push({ 'columnA': 'a', 'columnB': 'b', 'columnC': 'c', })

the other option is to use underTableSlot where you can place your summary row like this:

<CDataTable
  ...
  underTableSlot={<>Total: {totalSales}</>}
/>