What is the process to create a "Add Row" button to the igx-row-island that has focus. Just a simple "Add Row" that will append to the row-island collection.
Perfect that was the missing piece.
Hello Eric,
The grid is passed in the toolbar template itself:
<ng-template igxToolbarCustomContent let-context="grid">
<button igxButton="raised" (click)="openAddAlbumDialog(context)">Add Album</button>
</ng-template>
Which you can then store so you know to which grid to edit with the dialog.
public openAddAlbumDialog(grid) { this.dialogContext = grid; this.dialogAlbum.open(); }
Let me know if you have any additional questions.
Regards,
Maya Kirova
Hello Maya,
Great I was able to add the Toolbar to the rowisland and hook into the event for that particular child grid but how do I select the particular child grid instance?
I notice in your example you have a reference to dialogContext but how do I make that a reference to the child grid that contained the button that was clicked?
I am looking at the button click event:
Here is the modules method to handle the event:
Thank you for posting in our forum.
Rows cannot be added directly to the row island, instead they can be added to a particular child grid instance.
For example, refer to the following sample:
https://stackblitz.com/edit/angular-wngyjz-hlj9ra
Where a button is templated in the toolbar of the parent and child grids for adding rows for the particular grid.
Let me know if you are aiming to achieve something similar.