{"id":2467,"date":"2014-09-30T17:58:30","date_gmt":"2014-09-30T13:58:30","guid":{"rendered":"http:\/\/www.dhtmlx.com\/blog\/?p=2467"},"modified":"2023-05-05T13:58:27","modified_gmt":"2023-05-05T10:58:27","slug":"docking-undocking-cells","status":"publish","type":"post","link":"https:\/\/dhtmlx.com\/blog\/docking-undocking-cells\/","title":{"rendered":"DHTMLX Little-Known Features: Docking \/ Undocking Cells"},"content":{"rendered":"<p>We continue to share the small tips that simplify the development process. This week we will discover a possibility to dock\/undock cells. This feature is available in <a href=\"https:\/\/dhtmlx.com\/docs\/products\/dhtmlxLayout\/\" target=\"_blank\">dhtmlxLayout<\/a> and <a href=\"https:\/\/dhtmlx.com\/docs\/products\/dhtmlxAccordion\/\" target=\"_blank\">dhtmlxAccordion<\/a>.<\/p>\n<p>Each cell of the accordion and layout can be <a href=\"https:\/\/docs.dhtmlx.com\/layout__docking.html\" target=\"_blank\">docked or undocked<\/a>. Let\u2019s see how it can be achieved and how it looks like.<\/p>\n<p>By default, all the cells are docked:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2014\/09\/cell-docked.png\" alt=\"cells-docked\" width=\"548\" height=\"736\" class=\"aligncenter size-full wp-image-2468\" srcset=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2014\/09\/cell-docked.png 548w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2014\/09\/cell-docked-223x300.png 223w\" sizes=\"auto, (max-width: 548px) 100vw, 548px\" \/><!--more--><\/p>\n<p>When we undock the cell, it becomes taken out of the component and displayed in a separate window.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2014\/09\/cell-undocked2.png\" alt=\"cells-undocked\" width=\"529\" height=\"794\" class=\"aligncenter size-full wp-image-2475\" srcset=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2014\/09\/cell-undocked2.png 529w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2014\/09\/cell-undocked2-199x300.png 199w\" sizes=\"auto, (max-width: 529px) 100vw, 529px\" \/><\/p>\n<p>To undock a cell, use the <a href=\"https:\/\/docs.dhtmlx.com\/api__dhtmlxlayoutcell_undock.html\" target=\"_blank\">undock<\/a> method (we take the layout as an example):<\/p>\n<div class=\"codecolorer-container javascript default codecolorer-noborder\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">myLayout.<span class=\"me1\">cells<\/span><span class=\"br0\">&#40;<\/span>id<span class=\"br0\">&#41;<\/span>.<span class=\"me1\">undock<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><\/div><\/div>\n<p>If you want to dock this cell back, use the <a href=\"https:\/\/docs.dhtmlx.com\/api__dhtmlxlayoutcell_dock.html\" target=\"_blank\">dock<\/a> method:<\/p>\n<div class=\"codecolorer-container javascript default codecolorer-noborder\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">myLayout.<span class=\"me1\">cells<\/span><span class=\"br0\">&#40;<\/span>id<span class=\"br0\">&#41;<\/span>.<span class=\"me1\">dock<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><\/div><\/div>\n<p>You have also the possibility to operate with the window when the cell is undocked:<\/p>\n<div class=\"codecolorer-container javascript default codecolorer-noborder\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">myLayout.<span class=\"me1\">dhxWins<\/span>.<span class=\"me1\">window<\/span><span class=\"br0\">&#40;<\/span>id<span class=\"br0\">&#41;<\/span>.<span class=\"me1\">doSome<\/span><span class=\"br0\">&#40;<\/span>...<span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><\/div><\/div>\n<p>The id of the cell and the id of the window are the same.<\/p>\n<p>Check the related <a href=\"https:\/\/docs.dhtmlx.com\/layout__docking.html\" target=\"_blank\">documentation<\/a> and <a href=\"https:\/\/dhtmlx.com\/docs\/products\/dhtmlxLayout\/samples\/02_conf\/07_dockundock.html\" target=\"_blank\">demo<\/a>.<\/p>\n<p>We can\u2019t call it the most high-demand feature, but our aim is to tell you about all the possibilities that are hidden in our JavaScript UI library. See you next week!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We continue to share the small tips that simplify the development process. This week we will discover a possibility to dock\/undock cells. This feature is available in dhtmlxLayout and &#8230;<\/p>\n","protected":false},"author":2,"featured_media":3323,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,71,1],"tags":[33,43,14],"class_list":["post-2467","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-posts-for-codeproject-com","category-tutorials","category-uncategorized","tag-all-posts","tag-dhtmlx-tips","tag-tips"],"_links":{"self":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/2467","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/comments?post=2467"}],"version-history":[{"count":1,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/2467\/revisions"}],"predecessor-version":[{"id":11414,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/2467\/revisions\/11414"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/media\/3323"}],"wp:attachment":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/media?parent=2467"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/categories?post=2467"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/tags?post=2467"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}