How to manually toggle a detailrow on/off? #179
-
Please describe the feature you would like to request.Manually / programmatically toggle a detailrow on/off What is the use-case or motivation for this proposal?I have a situation where i want to add a new record to the grid and I want to use the detailRow to fulfill the details. Is there anything else we should know? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@ahmed-habbachi You need to get the instance of the To get the plugin instance: const detailRowPlugin = PblNgridPluginController.findPlugin(gridInstance, 'detailRow'); And then, just toggle it: detailRowPlugin.toggleDetailRow(row); Where
See a working example here: |
Beta Was this translation helpful? Give feedback.
@ahmed-habbachi You need to get the instance of the
detailRow
plugin and then provide the row you want to toggle on/off.To get the plugin instance:
And then, just toggle it:
Where
row
is the data row to toggle (the actual data object)See a working example here:
https://codesandbox.io/s/ngrid-detail-row-programmatic-toggle-r2fcf?file=/src/app/app.component.ts:2150-2236