By: kle_py
Date: 2009-06-26
Time: 20:05
|
Can i combine headergrp fields ?My (simplified) html template is:
I would like to get a listing-table which creates a new header, for each group of working sections. Now i have a special "search" condition, which gives me a problem, when there is a list of persons in different dptos, however same named "sub"-sections! In this case the list is shown as if the persons belong to the same sub-section. I could not find a way to "combine" the 2 relevant fields which represent my "real" header group. Example output:
However i would like to have:
Currently my workaround is using an additional row:
however i would like if it possible to do this the "direct" way, without need of invisible elements on the html side. Thank You.. |
||||
By: TomH
Date: 2009-06-26
Time: 20:54
|
Re: Can i combine headergrp fields ?Hello,
You can do this directly - and simply with TBS headergroup - a second headergroup defined inside of a first headergroup I won't try to re-write your code - instead hear is the source code from my example application at http://tomhenry.us/tbs3/ the application named "My Inventory Demo" The PHP which gets the rows - must do the 'order by' for the headergroup fields correctly.
The headergroup (two in this case) html/template code for the above is...
Hope that helps, TomH |
||||
By: TomH
Date: 2009-06-26
Time: 20:57
|
Re: Can i combine headergrp fields ?Sorry, just to be clear, I should have mentioned...
The first headergroup in my example is "category" field The second headergroup (inside the first) is "vendorid" |
||||
By: kle_py
Date: 2009-06-26
Time: 22:18
|
Re: Can i combine headergrp fields ?Thanks TomH,
well. I think Your solution is equivalent with what i actually have now (using my workaround) ! And It seems to me that the second group is NOT inside, the first header, just AFTER.. Only I make the first row (in Your example: containing [blk1.category;block=tr;headergrp=category] similar to "dpto" in my example) invisible, because i would like to have all (Category+vendor)-info as a title in a single row! Therfore i have the equivalent of [blk1.category] (equivalent of "dpto") as an additional info in the following line with headergrp (your "vendorid", my "sector"). |
||||
By: Skrol29
Date: 2009-06-27
Time: 23:14
|
Re: Can i combine headergrp fields ?Hi,
Another solutrion is to create in your SQL a new column which is a concatenation of sector+'/'+dpto. And use this column for the headergrp. If data doesn't come from SQL, you can create the column at the PHP side when the data are merged using a custom function that goes with parameter "ondata". |
||||
By: kle_py
Date: 2009-06-28
Time: 00:12
|
Re: Can i combine headergrp fields ?Thanks Skrol,
I think this i will do, sounds like what i searched for. I will add a new combined column in SQL, and use this for headergrouping, although without displaying it itself.. Thank You |