How to automate the sum the value of my column whenever the user filter the data in the table

How to automate the sum the value of my column whenever the user filter the data in the table

Thomas WilljohnThomas Willjohn Posts: 2Questions: 1Answers: 0

This is the code of my table of my web

This is the code for the footer callback, but I really don't get any results

This is the picture of my table

I just really don't know what should I do cause I am not really good at this

Answers

  • kthorngrenkthorngren Posts: 21,172Questions: 26Answers: 4,923

    Sounds like you want to use the selector-modifier of {search: "applied"}. Similar to the way {page: "current"} is used for the pageTotal.

    Kevin

  • Thomas WilljohnThomas Willjohn Posts: 2Questions: 1Answers: 0

    yes, it just that, in the footer it doesn't return any total value of my column

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • kthorngrenkthorngren Posts: 21,172Questions: 26Answers: 4,923

    Looks like your numbers are something like this P 100.00. You will need to remove the P. You can try changing i.replace(/[\$,]/g, '')*1 : to this:

    i.replace(/[\$,P]/g, '')*1 :
    

    If this doesn't help then provide the test case Colin asked for.

    Kevin

Sign In or Register to comment.