Questions tagged [sort]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
9
votes
3answers
14k views

sorting columns in pageblocktable

I came across a reusable visualforce component to sort columns in pageblocktable.It works great on other browsers but not in IE and also sorting on currency fields is not working.Has anyone used it? ...
3
votes
1answer
239 views

Notes & Attachments Wrapper class not sorting by LastModifiedDate correctly

I am using the below code with the Comparable interface to build a combined list of all the attachments and notes on a record, sorted in descending order of LastModifiedDate (in constructor of main ...
7
votes
1answer
3k views

How to sort Map by values

I need to loop through Accounts and then on all of the Contacts for those Accounts. I need to find what is the address with the most occurrences in Contacts for each Account and update the Account ...
3
votes
1answer
2k views

Custom sObject sorting with 'implements comparable'

I'm trying to perform a sort on a list of custom sObjects using the 'implements comparable' wrapper method. I'm running into some error that it seems isn't affecting anyone else. My custom object ...
5
votes
1answer
1k views

Apex equivalent of Java Comparator

I already know about the equivalent of Comparable - the class to be sorted should implement Comparable and then you can sort a List of said class. But, how about Comparator? In java, the Collections....
1
vote
1answer
2k views

How to sort a wrapper class list which has a reference to another wrapper in it

I want to sort a wrapper class list which has a reference to another wrapper in it.I tried implementing Comparable interface for both of class but it is showing error One or more of the items in ...
2
votes
1answer
2k views

Sorting apex:pageblocktable

I was wondering if someone has used the PageBlockTableEnhancerADV plugin and was able to implement sorting function for each column. I was trying to use the www.datatable.com sorting plugin but I can ...
1
vote
2answers
352 views

Sort a Map values apex [duplicate]

I have a map of Map<String,Decimal> test = new Map<String,Decimal>(); In this map i am adding values like classname and codepercentagecovered and iterating over the map and creating ...
1
vote
1answer
79 views

problem with sorting Quote

I have following custom quote page and controller but the problem is sorting is not working properly, When i click on column for sorting ascending and descending it will not show me the list with ...
1
vote
1answer
393 views

Lightning client side sorting (using a separate function, not inline)

I'm trying to implement a sorting function for the records returned by a callback. The normal javascript a.value - b.value inline implementation is working. This is the working code that I have: /...
0
votes
1answer
31 views

Sorting a List of different object Lists by datetime

I have a List<ListWrapper> comprised of List<Knowledge__kav> and List<Community_Event__c>. I would like to sort List<ListWrapper> by date but the two inner lists have different ...
0
votes
2answers
81 views

Value getting stored in a weird way in List<String>

I have this below method which returns unique values of Name. And this is used in VF page in a multiselect picklist. Set<String> uniqueCustomObjectSet = new Set<String>(); ...