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

Sort records based on Name in VF page?

I have a VF page to display Account records.

In that page records should display in the Sorting order based on AccountName.
For ex:
Account records:
Before Sort
{Dormat, Bake, Neil, Alkem}
After Sort
{Alkem, Bake,, Dormat,  Neil, }

How to achieve this in VF page...?

Hi Ravi ,
Do you have any class related with your page ? If yes then you can do it by using list.sort() method .IF not then I don't think we can directly sort in VF page .
You can call a javascript on page load and pass the list to a variable and then use sort method .

Please check below link .

Please let me know if you need any help .
Thank U @Manoj
Till now i don't develop any piece of code. But i need different approaches for the requirement and POSSIBLE ways for that..

So, In VF page We can't do this right?
Will u please give me the Code for that, If possible.

Once again Thank u @Manoj