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

271
Vistas
Angular-Ag-Grid: How to disable a Checkbox or Radio inputs in a specific row cell, after data is completely loaded and upon another event?

I'm having trouble disabling a checkbox that is loaded dynamically upon a action.

I'm using a CellRendererFramework with a custom component for loading basic grid data, below is my columnDef for the same. I have an event outside ag-grid when I check that checkbox I'm inserting dynamic row data to the grid. when doing so if that row data's state column value is false then I have to disable the checkbox and radio button of that specific row.

Here I'm able to find rowNodeId of the new row but I'm unable to make the checkbox and radio disabled:

{ headerName: 'abc', field: 'abc'},
{ headerName: 'State', field: 'state'},
{
  headerName: 'check Case',
  field: 'checkCase',
  cellRendererFramework: GridCheckboxRendererComponent,
  onCellValueChanged: (event: CellValueChangedEvent) => {
    this.updateCaseCheck(event);
  },
  cellRendererParams: {
    disableCaseCheckbox: this.disableWhenCaseisArchived
  }
 },
 {
   headerName: 'Make Default',
   field: 'makeDefault',
   cellRendererFramework: GridRadioButtonRendererComponent,
   onCellValueChanged: (event: CellValueChangedEvent) => {
     this.setDefault(event);
   },
   cellRendererParams: {
     disableDefaultRadio: this.disableWhenCaseisArchived
   }
  }

I tried using the custom cell renderer param but it is only setting while the grid is instantiating.

I'm setting data using gridApi, like below and caseRowData will have previous and post event new data:

this.gridApi.setRowData(this.caseRowData);

Inside my custom grid checkbox and radio components in agOninit I'm mapping this custom renderer value and the same is mapped to disable attribute on checkbox and radio inputs respectively.

Any help is highly appreciated.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Inside your cellRendererFramework component i.e.,GridCheckboxRendererComponent or GridRadioButtonRendererComponent you could use the data property that comes within params

class CellRenderer implements ICellRendererParams {

   public disableCheckbox: boolean;
   
   agInit(params: ICellRendererParams): void {
     this.disableCheckbox= params.data.state;
   }
}

Now you can use this disableCheckbox variable to disable attribute mapping on html.

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