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
Vivekh88Vivekh88 

Reordering the rows in VF page

Hi,

I have a requirement where i need to reorder particular rows in VF page whenever user clicks a link on reorder column in VF page.

Delete                  Reorder                Time            Topic
<Checkbox>         <Arrowheads>      <time>         <Topics>

Thanks
Vivek
Veenesh VikramVeenesh Vikram
On the colum header, when user clicks on the Arrow Head, you call controller method.
In controller method, you write a Dynamic Query which will use the ORDERBY to reorder/sort the records in the table.

Best Regards
Veenesh
Vivekh88Vivekh88
Hi Vikram,

Cant we move the particular row instead of sorting entire column?

Thanks
Vivek
Veenesh VikramVeenesh Vikram
No Vivek,

You cannot achieve such a functionality using VF page (Standard Salesforce). You will have to use complex jQuery/JavaScript in order to achieve the same. So i guess the best solution will be to Sort the columns on header click, which is simple and robust.

Best Regards
Veenesh