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
Developer
Posts: 281
Registered: ‎05-31-2012
My Device: Playbook
Accepted Solution

Need a simple example how to create a simple DataModel and add it to a ListView

Hi, i have a problem with the dataModel and the ListView.

I want to have the following, a DataModel just containing strings and a ListView to display it.

Also a button, everytime i click it, it should add a string to the DataModel.

 

How to do this just in QML?

Plase "+Like" my post if it was helpful.
Developer
Posts: 216
Registered: ‎09-18-2009
My Device: Z10

Re: Need a simple example how to create a simple DataModel and add it to a ListView

There a lots of examples https://developer.blackberry.com/cascades/sampleapps/

 

And even more examples you find in the github BlackBerry Cascades samples https://github.com/blackberry/Cascades-Samples

 

There are also some examples regarding ListView. See the ListViewBulkLoad example and the ListViewPageLoad example.

Developer
Posts: 281
Registered: ‎05-31-2012
My Device: Playbook

Re: Need a simple example how to create a simple DataModel and add it to a ListView

where do I find the  ListViewBulkLoad example and the ListViewPageLoad exmaple?

did not see them on the examples and github page.

Plase "+Like" my post if it was helpful.
Developer
Posts: 216
Registered: ‎09-18-2009
My Device: Z10

Re: Need a simple example how to create a simple DataModel and add it to a ListView

In fact, these examples are not in list the website shows. But they are in the repository at https://github.com/blackberry/Cascades-Samples.git

Developer
Posts: 281
Registered: ‎05-31-2012
My Device: Playbook

Re: Need a simple example how to create a simple DataModel and add it to a ListView

i downloaded the whole repository. but there is no ListViewBulkLoad example and the ListViewPageLoad exmaple

Plase "+Like" my post if it was helpful.
Developer
Posts: 216
Registered: ‎09-18-2009
My Device: Z10

Re: Need a simple example how to create a simple DataModel and add it to a ListView

The projects are in the ScrollableLists project.