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

How to display more than 15 fields in list views ??
How to display more than 15 fields in a list view on visualforce?
If i am using <apex:selectlist> or <apex:enhancedlist> I am able to build only 15 but not more than that?
If i am using <apex:selectlist> or <apex:enhancedlist> I am able to build only 15 but not more than that?
I am able to build 15 more than field using <apex:pageBlockTable>
Visualforce Page:
<apex:page controller="AddShowmoreInPageBlockTableController">
<apex:sectionHeader title="Home" subtitle="Account"/>
<apex:form>
<apex:pageBlock title="Recent Accounts" >
<apex:pageBlockTable value="{!accts}" var="account" id="table">
<apex:column headerValue="Account Name">{!account.Name}</apex:column>
<apex:column headerValue="Billing City">{!account.BillingCity}</apex:column>
<apex:column headerValue="Phone">{!account.Phone}</apex:column>
<apex:column headerValue="Account Name">{!account.Name}</apex:column>
<apex:column headerValue="Billing City">{!account.BillingCity}</apex:column>
<apex:column headerValue="Phone">{!account.Phone}</apex:column>
<apex:column headerValue="Account Name">{!account.Name}</apex:column>
<apex:column headerValue="Billing City">{!account.BillingCity}</apex:column>
<apex:column headerValue="Phone">{!account.Phone}</apex:column>
<apex:column headerValue="Account Name">{!account.Name}</apex:column>
<apex:column headerValue="Billing City">{!account.BillingCity}</apex:column>
<apex:column headerValue="Phone">{!account.Phone}</apex:column>
<apex:column headerValue="Account Name">{!account.Name}</apex:column>
<apex:column headerValue="Billing City">{!account.BillingCity}</apex:column>
<apex:column headerValue="Phone">{!account.Phone}</apex:column>
<apex:column headerValue="Account Name">{!account.Name}</apex:column>
<apex:column headerValue="Billing City">{!account.BillingCity}</apex:column>
<apex:column headerValue="Phone">{!account.Phone}</apex:column>
<apex:column headerValue="Account Name">{!account.Name}</apex:column>
<apex:column headerValue="Billing City">{!account.BillingCity}</apex:column>
<apex:column headerValue="Phone">{!account.Phone}</apex:column>
</apex:pageBlockTable><br/>
<apex:commandLink value="Show 25 items" action="{!showmoreAccount}" reRender="table" />
<apex:commandLink value="Show 10 items" onclick="window.location.reload();" rendered="{!Enable=='edit2'}"/>
</apex:pageBlock>
</apex:form>
</apex:page>
Controller coding:
public class AddShowmoreInPageBlockTableController {
public String Enable{get;set;}
public Account account{get;set;}
public List<Account> accts{get;set;}
public AddShowmoreInPageBlockTableController() {
accts = [select Id,Name,BillingCity,Phone from Account limit 10];
}
public PageReference showmoreAccount() {
accts = [select Id,Name,BillingCity,Phone from Account limit 25];
Enable='edit2';
return null;
}
}
I am using three field to populate the data and display in page
if you need more detail you can change the content
Thanks,
Jenefa
Sweet Potato Tec
Can you please share ur code for me...
Thanks,
Jenefa
Now try this one:
<apex:page standardController="Account" recordSetvar="accounts">
<apex:pageBlock title="Viewing Accounts">
<apex:form id="theForm">
<apex:panelGrid columns="2">
<apex:outputLabel value="View:"/>
<apex:selectList value="{!filterId}" size="1">
<apex:actionSupport event="onchange" rerender="list"/>
<apex:selectOptions value="{!listviewoptions}"/>
</apex:selectList>
</apex:panelGrid>
<apex:pageBlockSection >
<apex:dataList var="a" value="{!accounts}" id="list">
{!a.name} </apex:dataList>
</apex:pageBlockSection>
<apex:dataTable value="{!accounts}" var="a" id="list" cellspacing="5px" cellpadding="5px" >
<apex:column headerValue="Billing City" >{!a.BillingCity}</apex:column>
<apex:column headerValue="Billing City">{!a.BillingCity}</apex:column>
<apex:column headerValue="Phone" width="20%">{!a.Phone}</apex:column>
<apex:column headerValue="Billing City" >{!a.BillingCity}</apex:column>
<apex:column headerValue="Billing City">{!a.BillingCity}</apex:column>
<apex:column headerValue="Phone" width="20%">{!a.Phone}</apex:column>
<apex:column headerValue="Account Name">{!a.Name}</apex:column>
<apex:column headerValue="Billing City">{!a.BillingCity}</apex:column>
<apex:column headerValue="Phone" width="20%">{!a.Phone}</apex:column>
<apex:column headerValue="Billing City" >{!a.BillingCity}</apex:column>
<apex:column headerValue="Billing City">{!a.BillingCity}</apex:column>
<apex:column headerValue="Phone" width="20%">{!a.Phone}</apex:column>
<apex:column headerValue="Account Name">{!a.Name}</apex:column>
<apex:column headerValue="Billing City">{!a.BillingCity}</apex:column>
<apex:column headerValue="Phone" width="20%">{!a.Phone}</apex:column>
<apex:column headerValue="Account Name" >{!a.Name}</apex:column>
<apex:column headerValue="Billing City">{!a.BillingCity}</apex:column>
<apex:column headerValue="Phone" width="20%">{!a.Phone}</apex:column>
</apex:dataTable>
</apex:form>
</apex:pageBlock>
If you need the space you adjust the width for the field
Thanks,
Jenefa
Sweet Potato Tec
Now the real challenging is How to make the UI the same as Standard objects UI
any help or link will be a great.
Thanks inadvance for your time