Reputation: 25
How do I show or hide master detail portion using separate button instead of clicking the arrow button in first column? thanks
Upvotes: 1
Views: 1766
Reputation: 7614
You can get the row index of the master row you want to expand -
Call the below onClick of button.
showDetail(index) {
this.gridApi.getDisplayedRowAtIndex(index).setExpanded(true);
}
An example from docs where detail grid is expanded in onFirstDataRendered
Upvotes: 2