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.082 seconds

Just wanted to congratulate you on the J-Cook website / web development tool. In a couple of visits I've had a play around with Cook and have to say I think it is fantastic.  I've played with a number of component builders in the past and yours is certainly looking like the best so far. I'd also like to help you spread the word - I'm really surprised more people aren't excited about this tool. Good luck with the project.
Dean

Get Started