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

how to build visualforce page with column groupings
hi,
i have 4 fields (agreement,driver,period,sales) in my custom object.in db it will save like following
i want to show in visual force page like following

please help me how can fill sales based on period values. any links is there please send me
i have 4 fields (agreement,driver,period,sales) in my custom object.in db it will save like following
i want to show in visual force page like following
please help me how can fill sales based on period values. any links is there please send me
Please look at below links for how to use PageBlockTable on vf page..
https://www.salesforce.com/docs/developer/pages/Content/pages_quick_start_iteration_components.htm
https://www.salesforce.com/docs/developer/pages/Content/pages_quick_start_iteration_components.htm
Let us know if it helps you.
Class AgreementWrapper {
String agreementNo;
String driver;
// notice that we are using a map here to map the period to sales
Map<String,Decimal> periodSales;
}
2. execute SOQL to fetch all agreement records from db
3. loop over these records and prepare a List<AgreementWrapper>
4. use this List<AgreementWrapper> to display the records in the VF page
5. In the vf page for each column of period, just send in the column name as the key in the map and displa the value