 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
pecus
Joined: 31 Oct 2006 Posts: 3
|
Posted: Tue Oct 31, 2006 1:33 pm Post subject: group rows |
|
|
I'm a beginner with pear:data_grid but I got the gist of most of it.
I am looking for a way to group results returned from a query, eg. categories and subcategories, via multiple table heading rows.
Eg.
| Code: |
---------------------------------------
| category 1 |
---------------------------------------
| col1 | col2 | col3 | col4 | col5 |
---------------------------------------
| 1 33 4 3 4 |
---------------------------------------
| 1 33 4 3 4 |
---------------------------------------
| 1 33 4 3 4 |
---------------------------------------
| category 2 |
---------------------------------------
| col1 | col2 | col3 | col4 | col5 |
---------------------------------------
| 1 33 4 3 4 |
---------------------------------------
|
I need to add a row everytime the category changes.
I am trying to implement this behaviour using the Smarty renderer as it doesn't return the HTML table and I can loop the data and build the additional rows, but I am wondering whether there's a better way available in code (methods or additional classes).
Thanks,
Matteo[/code] |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|