Display sum of column instead of counting rows in search pane
Display sum of column instead of counting rows in search pane
Rawland_Hustle
Posts: 94Questions: 16Answers: 0
in SearchPanes
Link to test case: http://themeadow.se/ntjperrors/
Debugger code (debug.datatables.net):
Error messages shown: No error messages shown.
Description of problem:
How can I have the counters within the search panels sum by row 11, rather than counting the rows?
I have tried to implement the solution given here but I can't get it to work.
Replies
Per one of your other threads, I'm not able to see the data in the table, so I can't really diagnose the issue at the moment I'm afraid.
That said, the method Colin suggested is rather a workaround - it isn't intended that the countered in SearchPanes should be anything other than simple counters.
Allan
@allan The page is now located at https://themeadow.se/ntjperrors.
@colin Could you please help me out here, I really want the search panes to sum on row 11. How would I implement your solution in my case?
I'm not actually seeing where you've integrated Colin's example code on your page?
Colin is on holiday at the moment btw .
Allan
@allan I had removed it but I've added it again. I don't know what controls what in his code so I've just copy/pasted it. It does nothing on my page.
@allan I'm almost there now but why do the HTML get parsed in some of the rows in the (first) pane?
Oh, I think I know why. Because some of the rows in my search pane are shortened and then there's no match in
v.ServiceConsumerDescription === data
. How do I target the original data here?Could you update the test case to reflect that, please, then we can debug it,
Colin
@colin If you visit https://themeadow.se/ntjperrors/ you can se in the first search pane that for example row 6 is "broken". That's because of this part of the code:
The html get's broken when there's no match between
v.ServiceConsumerDescription
anddata
. There's no match sometimes becausedata
is shortened in this part of the code:Full code is here: https://themeadow.se/ntjperrors/main.js.
Thanks for that explanation. We'll take a look and report back, probably this Friday,
Colin
Hi @Rawland_Hustle ,
Can you not just detect the presence of your edit and then perform the same operation on the data point and compare those two? Something like...
Thanks,
Sandy