I want to expand row directly from an typescript method, i\'ve try with @viewchild but it doesn\'t work :
HTML:
There is a property expandedRows
that is an array of all current expanded rows. You should be able to add / remove your row to this list to toggle row expansion.
You will need to have:
and
expandedItems: Array = new Array();
// expand row
this.expandedItems.pop(this.gridData[rownumber]);
// hide row
this.expandedItems.push(this.gridData[rownumber]);
Simple plunker but you get the idea... https://plnkr.co/edit/Zra8UUMv4XQCv0lbRbMg?p=preview