How to expand row from datatable programmatically
问题 I want to expand row directly from an typescript method, i've try with @viewchild but it doesn't work : HTML: <p-dataTable [value]="array" [responsive]="true" expandableRows="true" #dt (onRowClick)="dt.toggleRow($event.data)"> <template let-test pTemplate="rowexpansion"> <div class="ui-grid ui-grid-responsive ui-fluid"> <div class="ui-grid-row"> Bouh ! </div> </div> </template> <p-column field="name" header="Vin"></p-column> <p-column field="company" header="Year"></p-column> </p-dataTable>