DHTMLX Docs & Samples Explorer

onDock and onUndock Events

These events call user-defined handlers (if there are any) and pass the following parameter:

  • itemId - the id of an item.
    dhxLayout.attachEvent("onDock", function(itemId){});
    dhxLayout.attachEvent("onUnDock", function(itemId){});

For example, let's attach an event handler for “onDock” event:

    dhxLayout.attachEvent("onDock", function(a){
        alert("The item was docked");
    });

Now, when we dock a layout item “a”, we'll get the specified alert.