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
Posts: 29
Registered: ‎09-07-2012
My Device: 9900
My Carrier: Airtel
Accepted Solution

insert data at specific position in listview in blackberry 10 cascades qml?

I have a listview with groupdatamodel, i need to insert the data in listview at specific location

 

         DataSource {
            id: dataSource
            source: "http://myurl.com"
            type: DataSourceType.Json
        
            onDataLoaded: {
             dataModel.insertList(data)  //Here i need to insert the data at specific location
            }
        }
    }
Can any one help me about this regards,
Highlighted
Developer
Posts: 291
Registered: ‎10-15-2012
My Device: bb10 developer
My Carrier: Orange

Re: insert data at specific position in listview in blackberry 10 cascades qml?

GroupDataModel is used for a sorted list - AFAIK you cannot insert data at arbitrary positions.

Instead you should use one of the unsorted datamodels (ArrayDataModel / QListDataModel)