primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Totals in datatable

Open pantonis opened this issue 10 years ago • 4 comments

Hi,

I'm trying to add total under a column. I suppose there is not built-in way to do it so I tried to do it manually. I am using RxJS to get the data from a rest endpoint and I am assigning a local variable with initial value of 0 to the footer column. Problem is that the value is not updated on the table after I get the results and I still see 0.

pantonis avatar May 29 '16 12:05 pantonis

I do not have this tried out, but try to inject ChangeDetectorRef from @angular/core and in subscribe method after setting updating a local variable(s) call changeDetectorRer.markForCheck()

Or if you are using ChangeDetectotionStrategy.onPush, try to change it to AlwaysCheck.

joe380 avatar May 30 '16 05:05 joe380

@joe380 I have changeDetection: ChangeDetectionStrategy.CheckAlways

and calling changeDetectorRer.markForCheck() after my number property is updated.

Everything has gone from the screen. No data at all

pantonis avatar May 30 '16 06:05 pantonis

Please use forum for such discussions;

http://forum.primefaces.org/viewforum.php?f=35

cagataycivici avatar Nov 13 '16 10:11 cagataycivici

Instead of footer , I need in the end of the Tables . Both vertically and Horizontally and their cross matrix sum

afras21 avatar Sep 10 '18 08:09 afras21