DHTMLX Docs & Samples Explorer

filter (key, value)

Required library edition: This method works with any edition of DHTMLX library
Required library file: datastore_debug.js

Filters DataStore by provided parameters.

  //shows all items where Publisher == "Test"
data.filter("Publisher","Test");
  //shows all items where Publisher starts from "Test"
data.filter(function(obj,value){
    	if (obj.Publisher.indexOf(value)==0) return true;
    	return false;
},"Test");

Parameters:

  • key - the name of a property, or a custom filtering method
  • value - the value which will be used for filtering