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
Mak OneMak One 

I want column of pageBlockTable to be clickable so that I can run a javascript method

Like when we click on column of pageblockTable to popup to filter or sort will come.

<apex:pageBlockTable value="{!wrapKey}" var="wrapKey1" width="20%" >
                            <apex:column headerValue="{!currField}" width="5%" onclick="showFilterPopUp(this)">
                                      <apex:outputField id="outputId" value="{!wrapKey1.sObj}" rendered="{! readOnly}"/>
                            </apex:column> 
</apex:pageBlockTable>

Here I want to click on Column header with apex:column where onclick is not working.
How to achieve it?
Balaji BondarBalaji Bondar
Hi Mak,,
Use code as below for your reference:
<apex:column>
	<apex:facet name="header">   
		<apex:commandLink action="{!ViewData}" value="Account Name{!IF(sortExpression=='name',IF(sortDirection='ASC','▼','▲'),'')}" id="cmdSort">
			<apex:param value="name" name="column" assignTo="{!sortExpression}" ></apex:param>
		</apex:commandLink>
	</apex:facet>
	<apex:outputLink value="/{!a.Id}" target="_blank">{!a.Name}</apex:outputLink>
</apex:column>
Ref link for more info: http://salesforcesource.blogspot.com/2008/11/adding-sorting-capability-to.html