Activity › Forums › Salesforce® Discussions › Can we create a collapsible pageblock table or Html table on a visualforce page?
Tagged: HTML, pageBlock, Salesforce Apex, Salesforce Visualforce Page
-
Can we create a collapsible pageblock table or Html table on a visualforce page?
Posted by Ajit on April 30, 2016 at 5:05 PMCan we create a collapsible pageblock table or Html table on a visualforce page?
Guha replied 8 years, 7 months ago 4 Members · 3 Replies -
3 Replies
-
Hi Ajit,
Please use the below example/code. This will help you.
<apex:page >
<apex:pageBlock id=”block1″>
<apex:pageBlockSection id=”section1″ columns=”2″ collapsible=”true” title=”Title”>
Example Area
</apex:pageBlockSection>
<font color=”#FF0000″><script>
twistSection(document.getElementById(‘{!$Component.block1.section1}’).getElementsByTagName(‘img’)[0])
</script></font>
</apex:pageBlock>
</apex:page> - [adinserter block='9']
-
Hi Ajit,
You can create collapsible pageblock table using pageblock section:-
<apex:page standardController=”Account”>
<apex:form>
<apex:pageBlock title=”My Content” mode=”edit”>
<apex:pageBlockButtons>
<apex:commandButton action=”{!save}” value=”Save”/>
</apex:pageBlockButtons>
<apex:pageBlockSection title=”My Content Section” columns=”2″ collapsible=”true”>
<apex:inputField value=”{!account.name}”/>
<apex:inputField value=”{!account.site}”/>
<apex:inputField value=”{!account.type}”/>
<apex:inputField value=”{!account.accountNumber}”/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Hope this helps -
Very simple – Add this below attribute to your VF tags.
<apex:pageBlockSection collapsible=”true” >
Log In to reply.