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
Highlighted
Developer
Posts: 235
Registered: ‎12-13-2011
My Device: Curve 9380
My Carrier: Vodafone-IN
Accepted Solution

How to populate unsorted data in listview ?

Hi ,

 

I am using group data model for list view, but the populated content sorted alphabatically. How to display list without sorting?

 

Thanks

Deepu George Jacob

Developer
Posts: 16,786
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: How to populate unsorted data in listview ?

use
grouping: ItemGrouping.None
see
https://developer.blackberry.com/native/reference/cascades/bb__cascades__itemgrouping.html#enumvalue...
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 235
Registered: ‎12-13-2011
My Device: Curve 9380
My Carrier: Vodafone-IN

Re: How to populate unsorted data in listview ?

Hi Simon,

 

I haved tested it. but it remove heading only. Result is in aphabetcal sort. I am webservice as json and data model is Group data model.

 

Thanks

Deepu George Jacob

Developer
Posts: 16,786
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: How to populate unsorted data in listview ?

ok, good question, i guess the groupdatamodel always sorts.
did you try to set sortingKeys empty?
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 235
Registered: ‎12-13-2011
My Device: Curve 9380
My Carrier: Vodafone-IN

Re: How to populate unsorted data in listview ?

No I didn't try that. I am just put data to model. I will try and get back to you.. Smiley Happy
Developer
Posts: 235
Registered: ‎12-13-2011
My Device: Curve 9380
My Carrier: Vodafone-IN

Re: How to populate unsorted data in listview ?

Sorting keys working perfectly.. But if it is null it shows the same result.
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: How to populate unsorted data in listview ?

Why are you using a sorting model when you don't want to sort the list just use one of the other models?

 


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Retired
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: How to populate unsorted data in listview ?

On the other hand, are you sure you don't want the data sorted? Unsorted lists can be a pain for users, and if the system is doing it for you for free... why not?

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker
Developer
Posts: 235
Registered: ‎12-13-2011
My Device: Curve 9380
My Carrier: Vodafone-IN

Re: How to populate unsorted data in listview ?

I am working on Array data model..

Smiley Happy

Thankyou 

Developer
Posts: 435
Registered: ‎09-20-2011
My Device: Z10 LE, Playbook, DevAlpha C, 9900, 9380
My Carrier: Vodafone

Re: How to populate unsorted data in listview ?

@PBernhardt, the model we using it for showing search result. This comes as a result of query %Like% from the server. So if it sorting then the most best data might fall at the end of the list.