You need to sign in to do that
Don't have an account?
Rajashri
VisualForce Page-Display Column in single row
Hi,
I have created the visualforce page and i am using two different variables using PageBlock table.
Page Block tabl creates two different sections.
How can i show all the columns in single row.below is my VF page
<apex:page controller="callCampaignController">
<apex:form >
<apex:pageBlock title="Campaign Members Details" >
<apex:pageblocktable value="{! CampaignMembers}" var="cm">
<apex:column >
<apex:pageblocktable value="{!cm.ActivityHistories}" var="tm">
<apex:column headerValue="Subject">
<apex:outputfield value="{!tm.Subject}"/>
</apex:column>
</apex:pageblocktable>
<apex:pageblocktable value="{!cm.CampaignMembers}" var="cpm">
<apex:column headerValue="Member Status">
<apex:outputfield value="{!cpm.Status}"/>
</apex:column>
</apex:pageblocktable>
</apex:column>
</apex:pageblocktable>
</apex:pageBlock>
</apex:form>
</apex:page>
I have created the visualforce page and i am using two different variables using PageBlock table.
Page Block tabl creates two different sections.
How can i show all the columns in single row.below is my VF page
<apex:page controller="callCampaignController">
<apex:form >
<apex:pageBlock title="Campaign Members Details" >
<apex:pageblocktable value="{! CampaignMembers}" var="cm">
<apex:column >
<apex:pageblocktable value="{!cm.ActivityHistories}" var="tm">
<apex:column headerValue="Subject">
<apex:outputfield value="{!tm.Subject}"/>
</apex:column>
</apex:pageblocktable>
<apex:pageblocktable value="{!cm.CampaignMembers}" var="cpm">
<apex:column headerValue="Member Status">
<apex:outputfield value="{!cpm.Status}"/>
</apex:column>
</apex:pageblocktable>
</apex:column>
</apex:pageblocktable>
</apex:pageBlock>
</apex:form>
</apex:page>
All Answers
Can you please provide the code for corresponding controller?
--Akram
Use below code.
May be it will solve your problem
I tried your code.
I am getting the below error
<apex:column> must be the direct child of either <apex:dataTable> or <apex:pageBlockTable>
Any idea? How to resolve it?
Below is my controller code.
I want to show all the fileds in single row.Currently it's creating different pageblocks.
public with sharing class callCampaignController {
private List<Schema.Campaign> CampaignMembers;
public List<Schema.Campaign> getCampaignMembers() {
CampaignMembers=[Select ID,Name, (Select Campaign.Name,Contact.Phone,Lead.FirstName,Lead.LastName,LeadID,Lead.Phone,Lead.Email, Lastmodifieddate,Status,CampaignId From CampaignMembers),
(Select Subject, Id,lastModifiedDate From ActivityHistories order by LastModifiedDate desc LIMIT 1 )
From Campaign order by LastModifiedDate desc];
return CampaignMembers;
}
}