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

Amazing Tool !
And only tool I know that allows complete Scaffolding in terms of component creation. It really saves loads of time (actually much more than that). Simple architecture enables quick and painless changes at any time. Code is clean and consintent. It's just... what's the word... neat! :) Great work! You should definetely try this one!

pi_wo (JED)
         

Get Started