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

266
Views
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 answers
Answer question

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 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!