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
kutts18kutts18 

Sortable grid

 

1. How can i implement a sortable grid in VF page?

   (ie a table with sort buttons in the header)

 

 

vcassvcass
You will most likely need to add some Javascript to your Visualforce page. You can do this by referencing a stand-alone file using a static resource. Use $Resource.<resource_name> as a merge field, where <resource_name> is the name you specified when you uploaded the resource.

 

 

<script type="text/javascript" src="{!URLFOR($Resource.NameOfStaticResource')}"></script>

 

 or inline Javascript

<script type="text/javascript">
//sortable table javascript logic
</script>

 

Here is one example found by searching on Google : http://www.kryogenix.org/code/browser/sorttable/

 

 

 

vcassvcass

I forgot to add the standard Salesforce functionality...

 

<apex:page showHeader="true" tabstyle="Case"> <apex:ListViews type="Case" /> </apex:page>

 

 Hope this helps !

 

 


TehNrdTehNrd

 

Great article on sorting, no javascript required.

http://blog.sforce.com/sforce/2008/09/sorting-collect.html

Message Edited by TehNrd on 02-20-2009 03:54 PM