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

New Contributor
Posts: 2
Registered: ‎02-04-2011
My Device: Not Specified

ListView help needed

Hi, I know this could be a really small thing i am missing here, but I have spent some good amout our hours trying to figure this out. I am from an Objective-C background and what I am trying to do is this: 


I have a main.qml which is a navigationPane and it has 2 other external pages added to it as attached object. The two pages have grid list views. Now, There is a MyApp.cpp file that loads a Json file and populates the result in the main.qml file. I only display the relevalt items on this page at first. When the user taps on any item, I want to take them to page2.qml which has a grid list view as I mentioned above and populate it with dataModel passed from main.qml (which has all the data from MyApp.cpp). This has give me no joy at all! I need help. What can I do to make this work? Please I need help on this one...



Posts: 206
Registered: ‎05-15-2012
My Device: None
My Carrier: Telus

Re: ListView help needed

The stamp collector example, in particular this file of it:


should give you a good idea of how to respond to list selection, then pass the DataModel item to a "details page" for the item, that uses the same data the listview was using, but shows more details on the selected item.

Check out my app, Alien Flow for reddit

And of course, like my post if you found it helpful or informative!