You need to sign in to do that
Don't have an account?

Visualforce table with dynamic header
Hi all,
I want to mak a table and would like to use the days of the month as header. For example in January there would be 31 columns and February 28 coumns etc. Column headers can be 1 , 2, 3, 4 or anything else. Is there anyone can share a sample code with me?
Thank you all in advance.
I found below code in Visual force developer's guide (pg 171). You will have to use dynamicComponent.
The <apex:dynamicComponent> tag has one required attribute—componentValue—that accepts the name of an Apex
method that returns a dynamic component. For example, if you wanted to dynamically generate the title of a section header
differently if the deadline for a submitting form has passed, you could use the following markup and controller code:
Here SectionHeader is changing as per date. I think this is what you want ?
Thanks,
Thank you for your comment,
I can clearly see your point but I am not planning to use the name of the field, I am planning to use number of days as column. Since these values are not in database, it looks like I need to create my own list and loop from this list.
It looks like I need to play with it little bit longer.
Thanks again.