locked
How can I refresh datasource of ListView

    Question

  • Now I already have a data inside the data object. Then I added some record to that object. The ListView should have one more record ,but it doesn't update. It still be the same. How can I solve this problem.


    Help Me Pleaseeee+++

    Wednesday, April 25, 2012 9:06 AM

Answers

  • Hi,

    I have the same problem and I manage to fix it in this way:

    The elements of the ListView are loaded in its "itemDataSource" property, so I updated this data source calling to listView.itemDataSource.change.

    This method takes two parameters: the Key for the element to update and the updated element.

    In my case the Key was quite simple to get, it was the current selected item, so I got it with "listView.currentItem.key".

    Hope it works for your too.


    Si la respuesta es correcta, por favor márcala como correcta. También puedes votarla como útil si te lo ha sido.

    • Proposed as answer by Javier Holguera Wednesday, April 25, 2012 9:22 AM
    • Marked as answer by Bob_Bao Monday, May 7, 2012 10:17 AM
    Wednesday, April 25, 2012 9:22 AM