You need to sign in to do that
Don't have an account?
Salesforce2015
VF PageBlock Table Sorting by Column
Hi Experts,
Below is my peace of VF Page Code (Pageblock Table).
<!-- table of data -->
<apex:pageBlockTable title="Time Sheets" value="{!tRecords}" var="c" id="pbt">
<apex:column >
<apex:facet name="header">
<apex:facet name="header">
<apex:inputCheckbox onclick="checkAll(this)"/>
</apex:facet>
</apex:facet>
<apex:inputCheckbox value="{!c.isSelected}" rendered="{!!c.isCheckboxVisible}"/>
</apex:column>
<apex:column >
<apex:facet Name="header">
Time Card Number
</apex:facet>
<apex:outputLink value="/apex/ProjectWeekTimeCardNew?ptcid={!c.tTime.id}" target="_blank" >{!c.tTime.Name}</apex:outputLink>
</apex:column>
<apex:column >
<apex:facet Name="header">
Project Name
</apex:facet>
<apex:outputLink value="/{!c.tTime.Project_id__r.id}" target="_blank" >{!c.tTime.Project_id__r.Name}</apex:outputLink>
</apex:column>
<apex:column value="{!c.tTime.Employee__c}"/>
<apex:column value="{!c.tTime.Start_Date__c}"/>
<apex:column value="{!c.tTime.End_Date__c}"/>
<apex:column value="{!c.tTime.Total_Hours__c}"/>
<apex:column value="{!c.tTime.Status__c}"/>
</apex:pageBlockTable>
Output:
Requirement:
I need to show all green coloured checkboxes are first in table then all empty places (i.e No Checkboxes) are next.
Thanks,
Manu
Below is my peace of VF Page Code (Pageblock Table).
<!-- table of data -->
<apex:pageBlockTable title="Time Sheets" value="{!tRecords}" var="c" id="pbt">
<apex:column >
<apex:facet name="header">
<apex:facet name="header">
<apex:inputCheckbox onclick="checkAll(this)"/>
</apex:facet>
</apex:facet>
<apex:inputCheckbox value="{!c.isSelected}" rendered="{!!c.isCheckboxVisible}"/>
</apex:column>
<apex:column >
<apex:facet Name="header">
Time Card Number
</apex:facet>
<apex:outputLink value="/apex/ProjectWeekTimeCardNew?ptcid={!c.tTime.id}" target="_blank" >{!c.tTime.Name}</apex:outputLink>
</apex:column>
<apex:column >
<apex:facet Name="header">
Project Name
</apex:facet>
<apex:outputLink value="/{!c.tTime.Project_id__r.id}" target="_blank" >{!c.tTime.Project_id__r.Name}</apex:outputLink>
</apex:column>
<apex:column value="{!c.tTime.Employee__c}"/>
<apex:column value="{!c.tTime.Start_Date__c}"/>
<apex:column value="{!c.tTime.End_Date__c}"/>
<apex:column value="{!c.tTime.Total_Hours__c}"/>
<apex:column value="{!c.tTime.Status__c}"/>
</apex:pageBlockTable>
Output:
Requirement:
I need to show all green coloured checkboxes are first in table then all empty places (i.e No Checkboxes) are next.
Thanks,
Manu
http://bobbuzzard.blogspot.co.uk/2014/09/sorting-visualforce-tables-with.html