Master Detail Configuration
- • optional
- • Type :
Object - • Properties :
expanded,template
Basic Master Detail Configuration
The
masterDetail property is used to define the master-detail relationship in the grid. It contains properties to control the expanded state and provide a custom template for the detail section.
| Name | Description | Type | Example |
|---|---|---|---|
expanded |
Controls whether the detail section is initially expanded or collapsed | bool |
false (default) |
template |
Function to render the content of the detail section, it passes the row object. The return value can be a DOM/Jquery Object | function |
function (row) {
let div = document.createElement('div');
let grid = document.createElement('div');
$(grid).bmGrid({
columns: ['Nombre', 'Apellido'],
data: [{
Nombre: row.first_name,
Apellido: row.gender
}]
});
$(div).css('padding', '20px').append(grid);
return div;
}
|