0
votes

How do we use ag grid to enable or disable 'editable' property for only 1 cell? I know that for styling, for example, we're able to change cell style for only 1 cell in the callback like below:

column.cellStyle = function (params) {
  if (some condition) {
       return '{ border: '1px solid red'};
  } else {
      return '{ border: '1px solid green'};
  }
1

1 Answers

1
votes

Use the editable attribute:

column.editable = function (params) {
  if (params.node.childIndex % 2) {
       return true;
  } else {
      return false;
  }

This example will make it so that every other row is editable.

Similar question and answer