Here we discuss areas of Master / Detail that don't quite fit within the other sections of the documentation.
Syncing Detail Scrolling with Master Copy Link
By default, the Detail Grid takes up the width of the Master Grid and does not move when the Master Grid's columns are horizontally scrolled. This is because the Detail Grid is not sitting with the other Master Grid's cells, rather it is in a separate container that overlays the Master Grid's cells and takes up the full width of the grid ignoring all the Master Grid's columns.
The underlying feature of the grid that allows the Detail Grid to span the width of the Master Grid is called Full Width Row.
It is possible to have the Detail Grid sit within the same container as the Master Grid's cells and hence move with the Master Grid's horizontal scrolling. This is achieved by Embedding the Full Width Row and is set via the grid property embedFullWidthRows=true
for the Master Grid. This tells the grid to layout (embed) the Detail Panel with the other rows.
In the example below, notice that horizontal scrolling is combined for both Master Grid and Detail Grid using the Embed Full Width Rows feature.
If you are mixing Embed Full Width Rows and Custom Detail, then be aware the Detail Panel will get rendered three times as follows:
- Pinned Left Columns
- Pinned Right Columns
- Pinned Centre Columns
This is because the Columns, and thus the Detail Panel, are appearing in three separate scrollable sections. The example below demonstrates this. Note the custom Detail Panel appears in all three sections.
If you want your custom Detail Panel to only show content in one section, have logic that inspects the components params.pinned
property and renders content relevant for the section.
Filtering and Sorting Copy Link
There are no specific configurations for filtering and sorting with Master / Detail but as there are multiple grids each grid will filter and sort independently.
Below shows a simple Master / Detail setup which has filtering and sorting enabled in both master and detail grids.
Grouping Copy Link
The Master / Detail is supported with Row Grouping. Only leaf nodes can be master rows.
Tree Data Copy Link
The Master / Detail is supported with Tree Data. Both leaf nodes and groups can be master rows. If a group is also a master row, the detail grid will be shown before its children.
Master / Detail will by default show detail grids for every row, including groups. To show detail grids for leaf nodes only, provide the isRowMaster
callback and return true
for leaf nodes only.
When using Tree Data Paths, filler groups cannot be master rows and isRowMaster
will not be called.
Layouts Copy Link
It is not possible to mix DOM layout for master detail. This is because the layout is a CSS setting that would be inherited by all grids contained with the master grid. So if your master grid was 'for-print', then all child grids would pick up the 'for-print' layout.
When using Master / Detail and for-print, then all detail grids need to use for-print.
When using Master / Detail and auto-height, then all detail grids need to use auto-height.
Cell Selection Copy Link
When Cell Selection is enabled on the Master Grid, the Detail Grid will not participate in the Cell Selection of the Master Grid.