@adaptabletools/adaptable-plugin-master-detail-aggrid-cjs v18.0.9
AdapTable Master Detail AgGrid Plugin Read Me
Version 7 of AdapTable introduced support for using Master-Detail grids in AG Grid.
It allows you to create a definition for the Detail grid which will apply for all detail grids.
This means that if you create a Format Column in Predefined Config it will apply in each detail grid.
How It Works
The masterDetailAgGridPlugin
has 2 properties:
detailAdaptableOptions - an
AdaptableOptions
object to be used for every Detail gridonDetailInit: (api: AdaptableApi) => void - an optional function which will be called whenever a Detail grid is opened (essentially initialised), providing you with the AdaptableApi instance for full programmatic access to all Adaptable features.
Example
We have set up a Master-Detail grid in AG Grid and the Adaptable Options object for the Master grid in the normal way.
And we have supplied the detail grid Adaptable Options in the plugins section. Here we create a Format Column in Predefined Config to be used in all Detail grids.
// typical AG Grid GridOptions object but popuplated for use in a Master-Detail grid
// for more information see: https://www.ag-grid.com/javascript-grid-master-detail/
const gridOptions: GridOptions = {
columnDefs,
rowData,
masterDetail: true,
detailCellRendererParams: {
detailGridOptions: {
columnDefs: detailColumnDefs,
},
getDetailRowData: function(params: any) {
params.successCallback(params.data.squad);
},
},
isRowMaster: function(dataItem) {
return dataItem ? dataItem.squad.length > 0 : false;
},
.......
};
const adaptableOptions: AdaptableOptions = {
primaryKey: 'name',
userName: 'Demo User',
adaptableId: 'Master Detail Demo - Master Grid',
predefinedConfig: demoConfig,
gridOptions: { ...gridOptions, modules: AllEnterpriseModules },
plugins: [
masterDetailAgGridPlugin({
detailAdaptableOptions: {
primaryKey: 'name',
adaptableId: 'Master Detail Demo - Detail Grid',
predefinedConfig: {
FormatColumn: {
FormatColumns: [
{
Scope: {
ColumnIds: ['age'],
},
Style: {
BackColor: '#ffffe0',
},
Rule: { BooleanExpression: '[age]> 30'}
},
],
},
},
},
}),
],
};
adaptableApi = await Adaptable.init(adaptableOptions);
Requirements
This plugin depends on the AG Grid @ag-grid-enterprise/master-detail
Module (or @ag-grid-enterprise/all-modules
) being present.
Help
Developers can learn how to access AdapTable programmatically at AdapTable Documentation.
More Information
General information about Adaptable Tools is available at our Website
Support
For all support enquiries please email support@adaptabletools.com
or raise a Support Ticket.
4 days ago
4 days ago
5 days ago
16 days ago
18 days ago
20 days ago
23 days ago
25 days ago
30 days ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
3 months ago
3 months ago
3 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago