Extend column sorting to allow per-column callbacks

Description

Extend the built-in sorting method of the fluid pager to allow columnDefs to provider either a custom comparator or a custom value extractor to use when sorting.

Environment

None

Attachments

1

Activity

Show:

Eric Dalquist February 1, 2011 at 5:11 PM

New default sorting function along with a default sorting callback impl and two example value extractors for dates and numbers.

This would be used like:
columnDefs: [
{key: "date", valuebinding: "*.date", sortable: true, sortValueExtractor : dateExtractor},
{key: "status", valuebinding: "*.status", sortable: true, sortFunction: hrs.pager.statusComparator},
{key: "total", valuebinding: "*.total", sortable: true, sortValueExtractor : hrs.pager.currencyExtractor},
{key: "type", valuebinding: "*.type", sortable: true},
{key: "title", valuebinding: "*.title", sortable: true}
]

Details

Assignee

Reporter

Components

Affects versions

Priority

Created February 1, 2011 at 5:09 PM
Updated October 17, 2011 at 1:30 PM

Flag notifications