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

WOW.. WOW... WOW... This is awesome... in less than 3 hours of work I have my application done... this is simply the best tool I ever tried to generate Joomla Components... Thank you very much for this tool and your answer.. it helped me a lot... My friends here in Brazil are going nuts with this...
Griiettner (Forum)

Get Started