how to calculate the percentage of a column

how to calculate the percentage of a column

pravspravs Posts: 29Questions: 4Answers: 0

Hi I need to calculate the percentage of particular column like (total_of_column/No.ofcolumn)*100 using footer call back. please help me I need it urgent. :(

Answers

  • pravspravs Posts: 29Questions: 4Answers: 0

    how to get the length of column in footer callback

  • kthorngrenkthorngren Posts: 21,303Questions: 26Answers: 4,947

    You could use count() to count the number of rows.

    Kevin

  • pravspravs Posts: 29Questions: 4Answers: 0

    yes but I got the count value as 0 in footer callback even though I have data in the table

  • allanallan Posts: 63,468Questions: 1Answers: 10,466 Site admin

    We'd need a test case to know why that is.

    This example shows how a total can be calculated and a percentage could be taken from that.

    Allan

This discussion has been closed.