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

156
Visualizações
AG-Grid Button Does Not Navigate to the Page

In my app, I am using AG-Grid to display a list. One of the columns of this list is the detail column. Inside it, there is a button that is supposed to navigate to the detail of that row. But I get the error below when I click the button and can not navigate to the detail of the row. My code is below, what should I do to make the button work? enter image description here

List TS:

constructor(
    private _router: Router,
  ) {}
  getTicketList() {
    // this.rowData = this._adminService.getTicketList(this.Filter);

    this._adminService
      .getTicketList(this.Filter)
      .subscribe((response: any) => {
        this.rowData = response;
      });
  }

  rowData: Observable<ITicket[]>;
        {
          headerName: 'Detay', field: 'TicketId', cellRenderer: BtnCellRenderer,
          cellRendererParams: {
            clicked: function (field: any) {
              this._router.navigateByUrl("/admin/ticket-detail/" + this.data.TicketId);
            }
          },
        },

BtnCellRenderer TS:

@Component({
    selector: "btn-cell-renderer",
    template: `<button mat-icon-button matTooltip="Detay" (click)="btnClickedHandler($event)">
  <mat-icon> open_in_browser</mat-icon>
  </button>`
})
export class BtnCellRenderer implements ICellRendererAngularComp, OnDestroy {

    refresh(params: ICellRendererParams): boolean {
        throw new Error("Method not implemented.");
    }
    private params: any;

    agInit(params: any): void {
        this.params = params;
    }

    btnClickedHandler() {
        this.params.clicked(this.params.value);
    }
}
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Can you try


clicked: function (field: any) {
  this._router.navigateByUrl("/admin/ticket-detail/" + this.data.TicketId);
}.bind(this)
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