Check documentation for the latest version of dhtmlxSuite attachGrid DHTMLX Docs

attachGrid

attaches dhtmlxGrid to a cell

dhtmlXGridObject attachGrid( [object config] );
configobjectoptional, an object with the Grid configuration
dhtmlXGridObjectdhtmlXGridObject instance

Example

// without parameters
var myGrid = dhxComponent.cells(id).attachGrid();
 
 
// passing a config object as a parameter
grid1 = myLayout.cells("a").attachGrid({
    image_path:'codebase/imgs/',
    columns: [{
        label: "Column A",
        width: 100,
        type: "ro",
        sort: "int",
        align: "right"
    },{
        label: "Column B",
        width: 250,
        type: "ed",
        sort: "str",
        align: "left"
    }],
    multiselect: true,
    xml: "grid.xml"
});

Back to top