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: 528
Registered: ‎10-06-2009
My Device: 9800,BB Dev Alpha,z10 limited edition

Refresh listview on particular event

Hi,

 

I have used a listview to display some data. I need to change its value on some event. I am doing some calculation according to result of event.

 

How can I refresh listview upon some event genration?

Rujuta Trivedi
Developer
Posts: 528
Registered: ‎10-06-2009
My Device: 9800,BB Dev Alpha,z10 limited edition

Re: Refresh listview on particular event

anyone who can help?

 

Rujuta Trivedi
Developer
Posts: 6,145
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30

Re: Refresh listview on particular event

[ Edited ]

Any change in the dataModel should cause an update in the connected ListView.

 

 


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

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 528
Registered: ‎10-06-2009
My Device: 9800,BB Dev Alpha,z10 limited edition

Re: Refresh listview on particular event

In datamodel,all values will be fixed. But I am displaying values by some calculation with respective fields. The calculation values will change at runtime and it should reflect the listview data

Rujuta Trivedi
Developer
Posts: 6,145
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30

Re: Refresh listview on particular event

[ Edited ]

If you want the ListView to change then you will have to change the data in the dataModel.

 

If you want to maintain the original data then either store it in a separate property within the ListItemData or maintain two ListViews.

 


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

Developer of stokLocker, Sympatico and Super Sentences.