When using primeng there's the following method to expand a row. I want to access the selected row's data to send a call to the server and expand the row when the data returns.
According to documentation, there's this (onRowClick)="dt.toggleRow($event.data)" call back, and the data is accessible using angular's double bracket notation {{id}}. However, how would I access the data from the selected row in typescript and not in html?
I think what you are asking is how do you access the data from the
onRowClickmethod?If that is what you are wanting to know, I think that if you defined your
onRowClickevent call like this:you will then have access to the data of the row clicked in your
rowClickedmethod.