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

287
Views
In Angular ag-grid, how to disable some values from selection in a dropdown

I am able to pass values to a dropdown as an array, however I would like for some of the values to be non selectable to the user(disabled state). The reason being, I want to be able to toggle the disabled state of these values based on the users permissions.

By column definition is as below :-

this.columnDefs.push({
          headerName: this.FIELD_NAME.toUpperCase(),
          field: this.FIELD_NAME,
          cellStyle: getBackgroundColor,
          editable: true,
          cellClass: cellClass,
          headerTooltip: this.DESCRIPTION,
          cellEditor: 'agSelectCellEditor',
          cellEditorParams: {
            values: this.approvalStatus
          }
        })

and the array is as follows :-

approvalStatus: any[] = [{name: 'Not Started',disable: false},{name: 'Work In Progress',disable: false},
     {name: 'On Hold',disable: false},{name: 'Pending',disable: true},
   {name: 'Completed',disable: true}];

I would like the user to be able to see all 5 options in the dropdown but not be able to select 'Pending' & 'Completed'.

Am I doing anything wrong or do I need to use a different cellEditor in this case?

about 4 years ago · Juan Pablo Isaza
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!