Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

176
Views
AG-Grid Master Detail Can not See Detail Rows

In my code, I am using AG-Grid with the master detail property to display some data. The code doesn't get any errors and the master row has records, but when I expand the detail, not 1 row is present even though in the network, params.data has values. My code is below. What am I doing wrong, and how should I fix it? enter image description here enter image description here

  constructor(
    private _reportService: ReportService,
  ) {
    this._reportService
      .getAllSupplierProductList()
      .subscribe((response: any) => {
        this.rowData = response;
      });
  }
  public detailCellRendererParams: any = {
    detailGridOptions: {
      columnDefs: [
        { headerName: 'Ürün Kodu', field: 'StockIntegrationCode' },
        { headerName: 'Ürün Adı', field: 'ProductName' },
        { headerName: 'Ürün Kategorisi', field: 'CategoryName' },

      ],
      defaultColDef: {
        flex: 1,
        filter: 'agTextColumnFilter',
        resizable: true,
        sortable: true,
        floatingFilter: true,
      },
    },
    getDetailRowData: (params) => {
      params.successCallback(params.data.StockIntegrationCode && params.data.ProductName && params.data.CategoryName);
    },
  } as IDetailCellRendererParams;

  rowData: Observable<IReportRow[]>;

  onFirstDataRendered(params: FirstDataRenderedEvent) {
    // arbitrarily expand a row for presentational purposes
    setTimeout(function () {
      params.api.getDisplayedRowAtIndex(1)!.setExpanded(true);
    }, 0);
  }

  onGridReady(params: GridReadyEvent) {

  }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

In the getDetailRowData function, you're given params.data, which is the data of the master row. You should obtain details and pass it to the params.successCallback function like this:

getDetailRowData: (params) => {
  this._reportService
    .getProductList(params.data.SupplierId)
    .subscribe(products => {
      params.successCallback(products);
    });
}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!