DHTMLX Docs & Samples Explorer

bind (target, rule)

binds 2 dataStore objects (just for filtration one of datasets. Changes in the master dataStore [creating, updating, deleting] doesn't reflect in the bound dataStore).

var data1 = new dhtmlXDataStore({ url:"../data/data1.json", datatype:"json" });
var data2 = new dhtmlXDataStore({ url:"../data/data2.json", datatype:"json" });
 
data2.bind(data1, function(tobj, sobj){
	if (sobj)
		return tobj.id == sobj.id;
});

Parameters:

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