Change grid subrow height on the fly

How can i change the height of a subrow programatically?

Hello @Nikolai_Dimentiev,

In case if you are referring to GPL version, you can update height of any single row, using the update method of dataCollection, like follows:

grid.data.update(item.id, { height:"200" });

In case if you are using PRO version and referring to the “subrow” you can control it’s height through the callback of the subRowConfig like follows:

const grid = new dhx.Grid("grid_container", {

    columns:[

        // columns config

    ],

    data: dataset,

    autoWidth: true,

    subRowConfig: (row) => ({

        height: row.data.length ? 250 : 0, // subrow height on the fly

        expanded: true

    }),

    subRow: (row) => new dhx.Grid(null, {

        columns: [

            // columns config

        ],

        data: row.data

    }),

});

Here is an example:

https://snippet.dhtmlx.com/03udbtmr

Useful API:

Kind regards,