Wijmo UI for the Web
refresh Method
wijmo.data Namespace > IDataView Interface : refresh Method
Settings for filtering, sorting and/or paging to be applied before loading. In contrast to filter/sort properties in IDataView, the format of properties in the shape parameter does not have to follow the specs defined in IDataView. For instance, BreezeDataView accepts a Breeze.Predicate as shape.filter. However the IDataView properties must not violate the IDataView specs. If a custom filter format cannot be aligned to the IDataView specs, then the properties values must be functions or null.
Prevents server requests and applies filtering/sorting/paging of the source array on the client-side.
Reloads the data view.
Syntax
var instance; // Type: wijmo.data.IDataView;
var value; // Type: IRefreshResult

// Parameters
var shape; // Type:  IShape
var local; // Type:  bool

value = instance.refresh(shape, local);
function refresh( 
   shape : IShape,
   local : bool
) : IRefreshResult;

Parameters

shape
Settings for filtering, sorting and/or paging to be applied before loading. In contrast to filter/sort properties in IDataView, the format of properties in the shape parameter does not have to follow the specs defined in IDataView. For instance, BreezeDataView accepts a Breeze.Predicate as shape.filter. However the IDataView properties must not violate the IDataView specs. If a custom filter format cannot be aligned to the IDataView specs, then the properties values must be functions or null.
local
Prevents server requests and applies filtering/sorting/paging of the source array on the client-side.

Return Value

A promise object that can be used to receive notification of asynchronous refresh completion or failure.
Remarks
Depending on the implementation, data can be loaded from a local or a remote data source. The implementation transaltes filtering/sorting/paging defined in the IDataView to the data provider specific format. If it is possible, then the data is reshaped on the client-side. The optional shape parameter can be used to change multiple filtering/sorting/paging settings at a time to avoid unnecessary refreshes. During the refresh, the isLoading property value must be true. After a successful refresh, the isLoaded property value must be true. When the method is called, the pending refresh, if any, is canceled.
See Also

Reference

IDataView Interface