function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mohit S.Mohit S. 

Displaying one of the two concatenated field values as bold in VF table

How can I make the values of field CreatedBy.Name appear in bold, in following code?

<apex:pageBlockTable value="{!Case.CaseComments}" var="c">
            <apex:column width="28%" headerValue="Date" value="{!c.createddate} ({!c.CreatedBy.Name})" />
</apex:pageBlockTable>
Best Answer chosen by Mohit S.
Himanshu MaheshwariHimanshu Maheshwari
Try below code to make created By Name Bold
<apex:column headerValue="Date">
        <apex:outputField value="{!c.createddate}"/>
        <apex:outputText value=" ({!c.CreatedBy.Name})" style="font-weight: bold;"/>
</apex:column>

All Answers

Amit Chaudhary 8Amit Chaudhary 8
Try below i hope that will work

<apex:pageBlockTable value="{!Case.CaseComments}" var="c">
            <apex:column width="28%" headerValue="Date">
{!c.createddate}  ( {!c.CreatedBy.Name})
</apex:column?
</apex:pageBlockTable>

 
Himanshu MaheshwariHimanshu Maheshwari
Try below code to make created By Name Bold
<apex:column headerValue="Date">
        <apex:outputField value="{!c.createddate}"/>
        <apex:outputText value=" ({!c.CreatedBy.Name})" style="font-weight: bold;"/>
</apex:column>
This was selected as the best answer
Abu HashimAbu Hashim
Try this..
<apex:pageBlockTable value="{!Case.CaseComments}" var="c">
            <apex:column width="28%" headerValue="Date">
                            {!c.createddate}  <b> {!c.CreatedBy.Name} </b>
            </apex:column>
</apex:pageBlockTable>
Mohit S.Mohit S.
Thanks Himanshu, it worked the way I wanted.
Amit & Abu, it worked your ways too, however the date format it took was too long - Fri Sep 25 14:31:15 GMT 2015 (Tim Cook) instead of 11/13/2015 7:47 AM (Tim Cook). How can we shorten the date format as required?
 
Mohit S.Mohit S.
Can anyone of you help me with following question too?

https://developer.salesforce.com/forums/?id=906F00000005KGYIA2