You need to sign in to do that
Don't have an account?
Newby
URGENT : display columns as rows in pageblock table
I have been able to fetch the records from the list and display them in a pageblock,
I want to display the !officeLoc.Office_Name__c and !officeLoc.State__c one below the other instead of next to each other.
as below
!officeLoc.Office_Name__c and
!officeLoc.State__c
My VF page :
<apex:page controller="infoController" action="{!loadInfoDetails}" showHeader="false" sidebar="false" > <apex:form > <apex:outputLink value="{!$Site.Prefix}/secur/logout.jsp" rendered="{!NOT(ISPICKVAL($User.UserType,'Guest'))}">{!$Label.site.logout}</apex:outputLink> <apex:pageBlock > <apex:pageblock title="My Info"> <apex:pageblocksection title="Personal Details"> <apex:pageblocksectionitem > <apex:outputLabel for="txtUName">User Name</apex:outputLabel> <apex:inputText id="txtUName" value="{!objUser.Username}"/> </apex:pageblocksectionitem> <apex:pageblocksectionitem > <apex:outputLabel for="txtEmail">User Email</apex:outputLabel> <apex:inputText id="txtEmail" value="{!objUser.Email}"/> </apex:pageblocksectionitem> <apex:pageblocksectionitem > <apex:outputLabel for="txtFirstName">First Name</apex:outputLabel> <apex:inputText id="txtFirstName" value="{!objUser.FirstName}"/> </apex:pageblocksectionitem> <apex:pageblocksectionitem > <apex:outputLabel for="txtLastName">Last Name</apex:outputLabel> <apex:inputText id="txtLastName" value="{!objUser.LastName}"/> </apex:pageblocksectionitem> </apex:pageblocksection> </apex:pageBlock> <apex:pageBlock mode="edit" title="Office Locations"> <apex:pageBlockTable columns="1" value="{!objUser.Office_Location__r}" var="officeLoc"> <apex:column > <apex:outputLabel for="txtoffName">Office Name</apex:outputLabel> <apex:inputText id="txtoffName" value="{!officeLoc.Office_Name__c}"/> </apex:column> <br> </br> <apex:column > <apex:outputLabel for="txtstate">State</apex:outputLabel> <apex:inputText id="txtstate" value="{!officeLoc.State__c}"/> </apex:column> </apex:pageBlockTable> </apex:pageblock> </apex:pageBlock> </apex:form> </apex:page>
I wrote a blog post on a very similar topic at:
http://bobbuzzard.blogspot.co.uk/2010/09/rotating-visualforce-table.html