DHTMLX Docs & Samples Explorer

forEachItem(handler)

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

iterator, calls user handler for each item

  • handler - user function, will take item id as an argument
    toolbar.forEachItem(function(itemId){
        // code here
    });
    // or
    function doWithItem(itemId){
        // code here
    }
    toolbar.forEachItem(doWithItem);