Check documentation for the latest version 6.0 of dhtmlxSuite attachHeader DHTMLX Docs

attachHeader

attaches header to component's top

void attachHeader(string|number|HTMLElement id, [number height] );

Parameters

idstring|number|HTMLElementid or DOM element
heightnumberoptional, header height

Example

dhxComponent.attachHeader("my_header");

Details

If height is not specified, component will try to detect it automatically. In this case you'd better specify it in CSS:


#my_header {
    padding-bottom: 2px;
    background-color: white;
}
 
#my_header .my_header_text {
    font-family: Tahoma;
    font-size: 12px;
    padding: 5px 10px;
    height: 70px; /* for autodetect */
    border: 1px solid #a4bed4   
}
<div id="my_header">
    <div class="my_header_text">
        Hi! I'm header!
    </div>
</div>


You can use visibility:hidden style for keeping your element hidden while it is not attached to component. After attaching the style will be changed to visibility:visible.

Back to top