Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Contributor
khajvah
Posts: 15
Registered: ‎10-24-2013
My Device: z10
My Carrier: Macadamian

Can I sort headers in ascending and entries in descending order in groupdatamodel?

I have a GroupdataModel and a listview for it. The data is grouped with keys (1 and 2) and is sorted accroding to entries' unique id. I want to give opportunity to users to choose how to sort the data. Is it possible, let's say, group data in descending order (group 2 first) and the actual data under group in ascending order (ids' as keys)?

Please use plain text.
BlackBerry Development Advisor (Retired)
robbieDubya
Posts: 418
Registered: ‎07-18-2012
My Device: Q10
My Carrier: Bell Canada

Re: Can I sort headers in ascending and entries in descending order in groupdatamodel?

Yes - it is possible - but requires some extra manipulation.

 

Add a secondary property to your object - that is either the inverse of the value (eg: - the value) or a predetermined reverse sort of the values.

 

 

--
Rob is no longer associated with BlackBerry.
Please use plain text.