Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Add sum function in Grid 14 Oct 2013 07:10 #11389

  • ewajoom
  • ewajoom's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 36
  • Thank you received: 2
Hi,

I would like to add a sum in grid for several columns.
Is it possible without programming ?

Thanks
Regards,

Please Log in or Create an account to join the conversation.

Add sum function in Grid 16 Oct 2013 15:00 #11399

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Without programming, no.
priority for this feature : low.


In your view, just enumerate all items in a foreach,
sum the values in a new var :
$this->myTotal += $item->myValue;

Then, echo($this->myTotal); where you want in the template
Coding is now a piece of cake
The following user(s) said Thank You: ewajoom

Please Log in or Create an account to join the conversation.

Add sum function in Grid 21 Oct 2013 13:37 #11426

  • ewajoom
  • ewajoom's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 36
  • Thank you received: 2
Very simple, thanks !

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.110 seconds

For starters it's just so easy to design an app in a way that I'm used to i.e. database first then views followed by customization. The fork system is pure brilliance from a developer standpoint as I can override things and still add and update my projects with minimal effort! Truly amazing to be able to build components in Joomla using incremental refinement without having to do everything by hand. Thanks for the great tool! I am so much more productive now than ever and I can't imagine building components any other way!!!!
Dave (Forum)

Get Started