Skip to main content

subGridWidth

The functionality is available in PRO Edition only

PRO

Description​

Optional. Defines the width of the Subgrid area in pixels

If not set, the sum of the widths of the Subgrid columns is applied

Usage​

subGridWidth?: number;

Example​

import { getData } from "./common/data";
import { Gantt } from "@svar/react-gantt";

const { tasks, scales } = getData();

const columns = [
{ id: "text", header: "Task name", flexgrow: 1 },
{ id: "start", header: "Start date", width: 120, align: "center" },
{ id: "status", header: "Status", width: 130, section: "subGrid" },
];

function App() {
return (
<Gantt
tasks={tasks}
scales={scales}
columns={columns}
subGridWidth={220}
/>
);
}

export default App;

To change the width at runtime, use the resize-grid action with the section: "subGrid" parameter.


Related articles: