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
Arnold Joseph TodasArnold Joseph Todas 

Bold row once i click Account Name

How can i Bold the row selected once i clicked the Account Name?
Here is my code : 
<apex:page sidebar="false" standardController="Account" recordSetVar="accounts" tabstyle="account" extensions="DisplayContact">
<img src="{!$Resource.OnePiece}" />

<apex:form id="frm" >
<apex:pageBlock title="Account" id="accounts">
   
      <apex:pageBlockTable value="{!accounts}" var="a" id="list">
      
        <apex:column headerValue="Account Name">
            <apex:commandLink rerender="contactDetails" value=" {!a.Name}" action="{!ContactLists}"> 
                <apex:param name="id" value="{!a.id}"/>
            </apex:commandLink> 
        </apex:column>
        
        <apex:column value="{!a.type}" />
        <apex:column value="{!a.billingstreet}"/>
        <apex:column value="{!a.billingCity}" />
        <apex:column value="{!a.billingCountry}" />
        <apex:column value="{!a.billingPostalCode}"/>
        <apex:column value="{!a.createdById}"/>
        
      </apex:pageBlockTable>
      <center>
      <!--<apex:commandButton value="Show Contacts"/>-->
      <apex:commandButton value="Hide Contacts" action="{!EditContact}" rerender="contactDetails" />
      </center>
</apex:pageBlock>


<apex:pageBlock title="Contact" id="contacts">
   <apex:outputPanel id="contactDetails" >
     <apex:pageBlockTable value="{!conList}" var="con" id="conlist" title="Contact">
         <apex:column value="{!con.Name}"/>
         <apex:Column value="{!con.Phone}" />
         <apex:Column value="{!con.Email}" />
         <apex:commandLink value="edit"/>
       <!--  
         <apex:column headerValue="Edit Record">
            <apex:commandLink rerender="contacts" value="edit" action="{!ContactLists}"> 
                <apex:param name="id" value="{!edit.id}"/>
            </apex:commandLink> 
        </apex:column>-->
         
     </apex:pageBlockTable>
     <center><apex:commandButton value="Add New Contact" rendered="{!showResults}" action="{!AddnewCont}"/></center>
   </apex:outputPanel>
</apex:pageBlock>
   </apex:form>
</apex:page>

User-added image
Thanks for Help!
AJ
Arnold Joseph TodasArnold Joseph Todas
Here is my Controller:
public with sharing class DisplayContact {

    public List<Contact> conList {get;set;}
    public Boolean showResults {get; set;}
    
    public DisplayContact(ApexPages.StandardSetController controller) {

    }
    
    public PageReference ContactLists()
    {
    showResults = true;
    if(ApexPages.currentPage().getParameters().get('id') != null)
      conList = [Select id,Name,Phone,Email from contact where accountId =: ApexPages.currentPage().getParameters().get('id')];
      
     return null;
    }   
    public PageReference EditContact(){ 
      conList = null;
      PageReference hide = new PageReference('https://c.ap0.visual.force.com/apex/AccountSearchContact');   
      showResults = false;   
      return null;
    }
    public PageReference AddnewCont(){
    
        if(ApexPages.currentPage().getParameters().get('id') != null)
          conList = [Select id,Name,Phone,Email from contact where accountId =: ApexPages.currentPage().getParameters().get('id')];

        return addnew;
    }

}

 
Dushyant SonwarDushyant Sonwar
Try this thing
http://salesforce.stackexchange.com/questions/31380/highlight-single-selected-row-in-table
This will help you..