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
FacebookFacebook 

Sorting of checkboxes on page load

How can we sort the option  checkboxes in which the options are given statically in the controller and displayed using select checkboxes attribute in the page?

 

Any help in this regard is kindly appreciated.

 

regards,

Facebook

 

 

 

 

 

Shashikant SharmaShashikant Sharma

Why don't you use 

 

Order By BooleanFieldAPIName ASC in the query that you are fetching data , it will give you all checked item first then unchecked on and Order By BooleanFieldAPIName DESC for oppsite results.

 

I hope this will work for you. If it does not then please let me know how are you fetching data means how are fetching records to be shown in the table.