Move grid total function definition to grid

1 view
Skip to first unread message

Alexander Obuhovich

unread,
Jun 11, 2010, 4:03:22 AM6/11/10
to In-Portal Development
Currently we have automatic grid totals calculation functionality. To activate it you need:
  • totals_render_as="grid_total_row" parameter in "m_RenderElement" tag, that renders "grid" block 
  • add "totals" key (possible values are SUM, COUNT, AVG or any MySQL aggregate function) in field declaration in "Fields" property in unit config
Such approach works, but won't allow to have different totals function based on place, where grid is used or special-based.

I propose to move "totals" option to field declaration in grid definition part, where "filter_block" is defined.

--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com

Alexander Obuhovich

unread,
Jun 11, 2010, 4:04:13 AM6/11/10
to In-Portal Development
For backwards compatibility we could still look in old place, when we don't have "totals" option in grid definition.

Dmitry Andrejev

unread,
Jun 14, 2010, 12:23:15 AM6/14/10
to in-por...@googlegroups.com
Hi Alex,

This sounds interesting and reasonable.

Do you think we should get into this in 5.1.x branch or can wait till we get our hands on 5.2.0 with improvements to grids?


DA.

Alexander Obuhovich

unread,
Jun 14, 2010, 3:40:21 AM6/14/10
to in-por...@googlegroups.com
This is more like a bug and can be released in any bugfix release after 5.1.0.

Dmitry Andrejev

unread,
Jun 14, 2010, 3:42:06 PM6/14/10
to in-por...@googlegroups.com
Sounds like this task is part of this discussion?



DA.

Alexander Obuhovich

unread,
Jun 14, 2010, 3:44:45 PM6/14/10
to in-por...@googlegroups.com
This related by "totals" word. Yes.

Alexander Obuhovich

unread,
Jun 14, 2010, 4:01:27 PM6/14/10
to in-por...@googlegroups.com
I've forgot to search existing discussions and submitted new one. Of course they both are related and will go to same task at the end.
Reply all
Reply to author
Forward
0 new messages