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

TOPIC:

group by in grid layouts 05 Nov 2013 10:17 #11538

  • ewajoom
  • ewajoom's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 36
  • Thank you received: 2
Hi, when generated grid layout, the query only do an order (no group by).
To change this I have to manually edit in model :
//GROUP ORDER : Prioritary order for groups in lists
foreach($this->getState('query.groupOrder', array()) as $groupOrder)
$query->order($groupOrder);
by
//GROUP ORDER : Prioritary order for groups in lists
foreach($this->getState('query.groupOrder', array()) as $groupOrder)
$query->group($groupOrder);

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

group by in grid layouts 05 Nov 2013 18:23 #11539

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
This is absolutly normal.

The grid groups are different than Group By from SQL.

It only applies a prioritary order that is a group a FK value, the more oftenly)
When the group value changes, it show a new header in the grid with contained elements inside.

You can instance unlimited group levels.
Coding is now a piece of cake

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

group by in grid layouts 05 Nov 2013 21:27 #11540

  • ewajoom
  • ewajoom's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 36
  • Thank you received: 2
Okay I understand why it's like that, thanks for explanation.
(the fact is that in this case I needed an SQL group by to use some aggregates functions in grid)

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

  • Page:
  • 1
Time to create page: 0.106 seconds
  I still don't believe he can really be human to do all this ! From all of the forums that I've ever participated in this is certainly the one that most encapsulates the feeling of being truly open source where everyone's opinions and contributions can and will shape the development of the service! It's truly awesome! Hope you enjoy cooking and look forward to reading and contributing to any of the editorial work that you proposed too!! Thanks
Gez (audibleid - JED)

Get Started