PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
group rows

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Structures
View previous topic :: View next topic  
Author Message
pecus



Joined: 31 Oct 2006
Posts: 3

PostPosted: Tue Oct 31, 2006 1:33 pm    Post subject: group rows Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Structures All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software