Search This Blog

Monday, December 21, 2015

JFYI - New RefreshXXX methods allowing to reload the underlying data source of a View or ViewItem

Just wanted to make sure you are aware of this small usability improvement, which will help you accomplish daily development tasks easier and in more intuitively.

From (done in v15.2.4):

The following methods are added to the View and ViewItem classes:[C#]
public virtual void RefreshDataSource()
public void Refresh(bool refreshDataSource)
Internally, the Refresh method calls RefreshDataSource when the refreshDataSource parameter is set to true.

The RefreshDataSource method overloads are:
ListView.RefreshDataSource -  calls the CollectionSourceBase.Reload method;
DetailView.RefreshDataSource  - calls the IObjectSpace.ReloadObject method and passes the DetailView.CurrentObject object to it;
ListPropertyEditor.RefreshDataSource - calls the ListView.RefreshDataSource method;
DetailPropertyEditor.RefreshDataSource - calls the DetailView.RefreshDataSource method.

No comments:

Post a Comment