DHTMLX Docs & Samples Explorer

sync (target, rule)

binds 2 dataStore objects (changes in the master dataStore [creating, updating, deleting] reflect in the bound dataStore).

var data1 = new dhtmlXDataStore({ url:"../data/data1.json", datatype:"json" });
var data2 = new dhtmlXDataStore({ datatype:"json" });
 
data2.sync(data1);

Parameters:

  • target - (object) the object that method is assigned to
  • rule - (function) sets the rule according which components will be bound(optional)