Skip to main content

attach()

attaches a DHTMLX widget into a Container control

attach(widget: any): void;

Parameters:

widget - the DHTMLX widget

Example

 const form = new dhx.Form("form", {    css: "dhx_widget--bordered",    padding: "40px",    rows: [        {            type: "container",            name: "grid",            padding: "12px 0px",            height: "100px"        },    ]});
const grid = new dhx.Grid(null, {    columns: [        { width: 200, id: "country", header: [{ text: "Country" }] },        { width: 200, id: "population", header: [{ text: "Population" }] },        { width: 200, id: "yearlyChange", header: [{ text: "Yearly Change" }] },    ],});
form.getItem("grid").attach(grid);

Change log:

added in v7.2