+ Start a Discussion
Madhura BMadhura B 

HeaderValue is not in bold face

Hi,

 

I have pageblocktable within a pageblocktable. HeaderValue in the inner pageBlockTable does not appear in bold face however headervalues in the outer pageblocktable is in bold face. This is happening in Customer Portal

 

Is there anyway I can have them in boldface.

 

 

Thanks,

Best Answer chosen by Admin (Salesforce Developers) 
RArunrajRArunraj

Hi madhura,


Please check with the below code, You can use <apex:facet> tag for column header and also inside that use <b> tag to make the font as bold.


To run the below code, use the URL in the below format
https://c.ap1.visual.force.com/apex/page?id=00190000005Bqsc

<apex:page standardController="Account">  

<apex:pageBlock>        

<apex:pageBlockTable value="{!Account}" var="act">                           

 

 // Outer PageBlockTable                        

<apex:facet name="header">AccountName:</apex:facet>            

<apex:column>{!act.name}</apex:column>                                    

 

<apex:column>                

<apex:pageblockTable value="{!act.contacts}" var="ct">              

 // Inner PageBlockTable                                    

<apex:facet name="header"><b>ContactName:</b></apex:facet>                  

 <apex:column> {!ct.lastname}</apex:column>                                  

 </apex:pageblockTable>            

</apex:column>

                  

</apex:pageBlockTable>    

</apex:pageBlock>

</apex:page>

 

Thanks,

R. Arunraj

All Answers

Edwin VijayEdwin Vijay

can you try using the style attribute

 

style="font-weight:bold;"

 

Madhura BMadhura B

Edwin,

 

This will only make the content in the column boldface but not the HeaderValue.

RArunrajRArunraj

Hi madhura,


Please check with the below code, You can use <apex:facet> tag for column header and also inside that use <b> tag to make the font as bold.


To run the below code, use the URL in the below format
https://c.ap1.visual.force.com/apex/page?id=00190000005Bqsc

<apex:page standardController="Account">  

<apex:pageBlock>        

<apex:pageBlockTable value="{!Account}" var="act">                           

 

 // Outer PageBlockTable                        

<apex:facet name="header">AccountName:</apex:facet>            

<apex:column>{!act.name}</apex:column>                                    

 

<apex:column>                

<apex:pageblockTable value="{!act.contacts}" var="ct">              

 // Inner PageBlockTable                                    

<apex:facet name="header"><b>ContactName:</b></apex:facet>                  

 <apex:column> {!ct.lastname}</apex:column>                                  

 </apex:pageblockTable>            

</apex:column>

                  

</apex:pageBlockTable>    

</apex:pageBlock>

</apex:page>

 

Thanks,

R. Arunraj

This was selected as the best answer
Madhura BMadhura B

Thanks a lot Arunraj. It works :)