DHTMLX Docs & Samples Explorer

Initialization

Included files

To use the functionality of dhtmlXDataStore, you need to include one file:

<script type="text/javascript" src="../codebase/datastore.js"></script>

Object constructor

You have 2 ways to initialize and fill the DataStore:

  • Create and then fill with script:

    var myDataStore = new dhtmlXDataStore();
    myDataStore.parse([
    		{id:"1", name:"Accounts Department"},
    		{id:"2", name:"Customer Service"},
    		{id:"3", name:"Developing Department"}
    ]);
  • Specify the path to a data file in the constructor (fill from server):

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