You need to sign in to do that
Don't have an account?
Is it possible to render groupings in an apex:dataTable?
I have a custom object that includes a picklist field of Category with three possible values: Hot, Warm, Cold. I want to display a list of custom objects using an apex:dataTable in my custom Visualforce page, but I would like to group my output by Category. I'm wondering if there's a function in the dataTable that allows me to render groupings of rows separated by a row with a single column that renders just the Category name of the matching items below it.
For example:
For example:
- Hot
- Item 1 - columns of data
- Item 2 - columns of data
- Warm
- Item 3 - columns of data
- Item 4 - columns of data
- Item 5 - columns of data
- Cold
- Item 6 - columns of data
A common trick is to use breakBefore of <apex:column>
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_column.htm