In my application I use the ObjectListView (which internally uses ListCtrl) and the application informs the list via pubsub when a model object has been changed, this then calls olv.RefreshObject(changedObject).
The problem I am having is that the new values do not show, unless I manipulate the list in some way. E.g. changing the width of an unrelated column or minimize/maximize the window is enough to have the new value show.
I tried using Refresh, Update call it with CallLater but no effect.
I got similar problems, and experimenting all variations possible of Refresh, Update, CallLater (and you can add RepopulateList) is painful and often unsuccessful. But I still would recommend trying RepopulateList. If that doesn't work, you can reset the all list with SetObjects. This rebuilds the all OLV, but it is usually sufficiently fast, and it should work.
Raphael
···
On 10/21/2013 10:34 AM, Werner wrote:
Hi,
In my application I use the ObjectListView (which internally uses ListCtrl) and the application informs the list via pubsub when a model object has been changed, this then calls olv.RefreshObject(changedObject).
The problem I am having is that the new values do not show, unless I manipulate the list in some way. E.g. changing the width of an unrelated column or minimize/maximize the window is enough to have the new value show.
I tried using Refresh, Update call it with CallLater but no effect.
I got similar problems, and experimenting all variations possible of Refresh, Update, CallLater (and you can add RepopulateList) is painful and often unsuccessful. But I still would recommend trying RepopulateList. If that doesn't work, you can reset the all list with SetObjects. This rebuilds the all OLV, but it is usually sufficiently fast, and it should work.
Would really not like to have to reload the whole list from the Database and potentially over a slowish network, anyhow I think I found my problem. In this particular case the list object is modified through a db trigger when some other related data is changed and my RefreshObject call is too early.