sync

allows you to sync two copies of data (all or just a part of it) from one DataCollection to another

void sync(object source, [function filter,boolean silent] );
sourceobjectthe object that the method is assigned to
filterfunctionthe filtering function
silentbooleanif you set the parameter to true, the object won't be repainted after synchronization

Example

//full copy
$$('$richselect1').getList().data.sync(data);
 
//partial copy          
$$('$richselect1').getList().data.sync(data, function(){
    this.filter(function(data){
    return data.year > 1994;
    });
});

Related samples

Details

Pay attention that you need to call the getList() method to access the data collection of Combo and Richselect.

See also
Back to top
Join Our Forum
We've retired comments here. Visit our forum for faster technical support, connect with other developers, and share your feedback there.