DevExtreme dxo-master-detail load data function

15 Views Asked by At

I define a dx-data-grid with its proper dataSource (defined on the component) and a

<dx-<dxo-master-detail [enabled]="true" template="detail">
</dxo-master-detail>
  <div *dxTemplate="let item of 'detail'">..

I'm trying to invoke a function when one of the grid rows is expanded. The function makes an http request to fetch the proper data by passing the "row id". Such data (an array of objects) should be shown inside the box of the dxo-master-detail.

I tried using onRowExpanded event function:

async onRowExpanded(e) {
    const rowKey = e.key;
    let userData= await this.getUserData(e.key.user_id);
    return userData.data;
  }

Eventhough the data is correctly returned from the function I not able to render it.

0

There are 0 best solutions below