Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

180
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda