Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

179
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda