I have a pageblock table and its the most basic version at that. The requirement is to have dynamic columns based on the values of a particular field value and other columns grouped below this one.

For eg. my data is like this:

Existing data

I want the output as:
Required Output

And similarly if there are more accounts/fields, they should be grouped and displayed accordingly. Could someone please guide as to how to proceed on this?

  • Did you try looking into 'apex:dynamicComponent' ?
    – javanoob
    Dec 17, 2015 at 12:02

1 Answer 1


You might need to create a wrapper class to represent a row of your table. It will have a list of headers(dates), list of account names and statuses. Then you can put all your data in a collection of such wrappers and display it with apex:repeat check this link for more details on dynamic columns.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.