I have a custom object - Obj__c
. In a vf page when I return those object records under a pageblock section with column="2" in order by sequence field value, they showup as 1st , 3rd , 5th record under column 1. 2nd , 4th , 6th record under column 2.
I need to show them as 1st , 2nd , 3rd under column 1 and 4th , 5th , 6th under column 2.
Please let me know how can I achieve that?
Page code:
<apex:repeat value="{!FieldSObjs}" var="s"> //FieldSObjs this is the metadata //object records referred to.
<apex:pageBlockSectionItem rendered="{!s.dispUpdate == 'Update Only' || s.dispUpdate == 'Display and Update'}">
<apex:outputText >{!s.Label}</apex:outputText>
<apex:panelGroup >
<apex:inputCheckbox value="{!s.updFlag}" onchange="updUpdateSec();void(0);"/>
<apex:inputText disabled="{!!s.updFlag}" value="{!s.newvalue}" maxlength="{!s.len}" rendered="{!s.type == 'STRING' || s.type == 'TEXTAREA'}"/>
<apex:input disabled="{!!s.updFlag}" type="number" value="{!s.newNumValue}" rendered="{!s.type == 'INTEGER' || s.type == 'CURRENCY' || s.type == 'DECIMAL' || s.type == 'PERCENT' || s.type == 'DOUBLE'}"/>
<apex:input disabled="{!!s.updFlag}" type="date" value="{!s.newValueDate}" rendered="{!s.type == 'DATE'}"/>
<apex:input disabled="{!!s.updFlag}" type="datetime-local" value="{!s.newValueDateTime}" rendered="{!s.type == 'DATETIME'}"/>
<apex:input disabled="{!!s.updFlag}" type="time" value="{!s.newValueTime}" rendered="{!s.type == 'TIME'}"/>
<apex:inputCheckbox disabled="{!!s.updFlag}" value="{!s.newvalueBoolean}" rendered="{!s.type == 'BOOLEAN'}"/>
<apex:selectList disabled="{!!s.updFlag}" rendered="{!s.type == 'PICKLIST' && s.depPicklist = false}" size="1" value="{!s.newvalue}" >
<apex:selectOptions value="{!s.plist}"/>
<apex:actionSupport action="{!s.invokeDepPicklistRefresh}" event="onchange" reRender="pb3">
</apex:actionSupport>
</apex:selectList>
<apex:selectList disabled="{!!s.updFlag}" rendered="{!s.type == 'PICKLIST' && s.depPicklist = true}" size="1" value="{!s.newvalue}" >
<apex:selectOptions rendered="{!s.depPicklist = true}" value="{!s.depList}"/>
</apex:selectList>
<!--apex:commandButton action="{!s.getDepValues}" rendered="{!s.depPicklist = true}" value="Refresh"/-->
</apex:panelGroup>
</apex:pageBlockSectionItem>
</apex:repeat>
Class Code:
oConfigRecordFieldList = [SELECT Id , Default_Value_abv__c , Display_Update_abv__c , Field_API_abv__c , MUP_Config_abv__c , Name , Search_Flag_abv__c
FROM Mass_Update_Process_Field_abv__c where MUP_Config_abv__c = :ConfigRecordId order by order_abv__c];
objDesc = gd.get(oConfigRecord.Object_API_Name_abv__c).getDescribe();
objFieldMap = objDesc.fields.getMap();
objChilds = objDesc.getChildRelationships();
FieldSObjs = new List<cField>();
// displayFieldSObjs = new List<cField>();
FieldSObjsMap = new Map<String,cField>();
depFieldMap = new Map<String,List<String>>();
for(Mass_Update_Process_Field_abv__c f: oConfigRecordFieldList)
{
sRecordTypeSObjType = '';
if(objFieldMap.get(f.Field_API_abv__c) != null)
{
cField cf = new cField(objFieldMap.get(f.Field_API_abv__c).getDescribe(),f.Name, f.Field_API_abv__c,f.Search_Flag_abv__c, f.Display_Update_abv__c,f.Id,this);
FieldSObjs.add(cf);
FieldSObjsMap.put(cf.apiname, cf);
}