React Data Grid

Master / Detail - Master Rows

react logo
Enterprise

Master Rows are the rows inside the Master Grid that can be expanded to display Detail Grids.

Static Master Rows

Once a Master Grid is configured with masterDetail=true, all rows in the Master Grid behave as Master Rows, in that they can be expanded to display Detail Grids.

// by itself, all rows will be expandable
const masterDetail = true;

<AgGridReact masterDetail={masterDetail} />

Because Static Master Rows are used in all the basic examples of Master / Detail, another example is not given here.

Dynamic Master Rows

Dynamic Master Rows allows specifically deciding what rows in the Master Grid can be expanded. This can be useful if, for example, a Master Row has no child records, then it may not be desirable to allow expanding the Master Row.

To specify which rows should expand, provide the grid callback isRowMaster. The callback will be called once for each row. Return true to allow expanding and false to disallow expanding for that row.