Master-Detail Grid is a use case scenario, in which the details of a Master Grid record, is viewed in a separate Grid(Detail Grid) by clicking the particular row.
The steps to achieve this scenario is as follows,
rowSelected
event.
dataSource
property.The above demo is implemented as follows.
DetailComponent(ej-griddetail)
to show details of selected row from Master Grid.DetailComponent
has an Input
property key
, based on which
the data will be filtered and set to the Detail Grid. Here the CustomerID value is used as key value.MasterComponent
which has Master Grid component with
rowSelected
event bound to it.MasterComponent
uses DetailComponent
and it updates key
property when a row is selected in the Master Grid.Use
selectedRowIndex
to select a row at the initial rendering.
Injecting Module
Grid component features are segregated into individual feature-wise modules. To implement this use case,
the selection feature need to be enabled and also we need to inject
Selection
module into the services
.