You need to sign in to do that
Don't have an account?
Ethan Hotz
Need help constructing complex data table
I'm trying to construct a table that tracks how many hours per week a developer works on each project they're assigned to. The collapsed view for each row should show the total amount of assigned hours per developer per week, but when expanded, the per-project breakdown should be shown. Here's a rough sketch of what I'm trying to do:
It seems like I might need a nested table for each row, with each nested table's column headers being the collapsed data? I'm not sure if that's at all possible with visualforce or not.
Oh, also, the weekly column headers need to be dynamically generated, and update week to week. I've started with that here:
Developer | 1/1/2016 | 1/8/2016 | 1/15/2016 | 1/22/2016 |
Bob
| 30/40 | 40/40 | 20/40 | 0/40 |
John
| 40/40 | 40/40 | 30/40 | 5/40 |
Project1 | 20 | 30 | 25 | 0 |
Project2 | 20 | 10 | 5 | 5 |
It seems like I might need a nested table for each row, with each nested table's column headers being the collapsed data? I'm not sure if that's at all possible with visualforce or not.
Oh, also, the weekly column headers need to be dynamically generated, and update week to week. I've started with that here:
<apex:pageBlock > <apex:pageBlockTable value="{!projectList}" var="project" > <apex:column headerValue="Developer"> <apex:outputText>{!project.User__c}</apex:outputText> </apex:column> <apex:repeat var="week" value="{!formattedWeekList}"> <apex:column headerValue="{!week}"> </apex:column> </apex:repeat> </apex:pageBlockTable> </apex:pageBlock>But I'm afraid I'm lost as to where to go from here. Any help in the right direction would be hugely appreciated.
VineetKumar
You are going in the right direction, explore on the use of apex repeats, renders and reRenders