# Prevent Editing for Specific Fields

The [Angular Grid](https://www.telerik.com/kendo-angular-ui/components/grid) allows you to restrict users from editing specific fields. This is suitable when you want some columns to stay the same, while still letting users edit the rest of the information.

The following example demonstrates how to prevent editing for specific Grid fields.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/grid/editing/preventing/source.txt)

To prevent editing specific cells, you can use any of the following approaches:

* Disable editing for selected fields, such as IDs or company names, by setting the built-in [`editable`](https://www.telerik.com/kendo-angular-ui/components/grid/api/columncomponent#editable) option of the respective column(s) to `false`.

  ```html
  <kendo-grid ... >
      <kendo-grid-column field="ProductID" [editable]="false"></kendo-grid-column>
      ...
  </kendo-grid>
  ```

* Omit the field(s) declaration in the `FormGroup`.

  ```ts
  public createFormGroup(dataItem: any): FormGroup {
      return this.formBuilder.group({
          // Exclude ProductID so only the remaining fields are editable.
          'UnitPrice': dataItem.UnitPrice,
          'UnitsInStock': [dataItem.UnitsInStock, Validators.compose([Validators.required, Validators.pattern('^[0-9]{1,3}')])],
          'Discontinued': dataItem.Discontinued
      });
  }
  ```

* Skip the [`editCell`](https://www.telerik.com/kendo-angular-ui/components/grid/api/gridcomponent#editcell) method invocation in the [`cellClick`](https://www.telerik.com/kendo-angular-ui/components/grid/api/gridcomponent#cellclick) event handler.

  ```ts
  public cellClickHandler({ sender, column, rowIndex, columnIndex, dataItem, isEdited }) {
      if (!isReadOnly(column.field)) {
          sender.editCell(rowIndex, columnIndex, this.createFormGroup(dataItem));
      }
  }
  ```

The following example demonstrates the complete implementation of the `cellClick` event-handler approach.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/grid/editing/preventing/cell-click/source.txt)

## Suggested Links

* [Angular Grid Editing Basics](https://www.telerik.com/kendo-angular-ui/components/grid/editing/basics)
* [API Reference of the GridComponent](https://www.telerik.com/kendo-angular-ui/components/grid/api/gridcomponent)
* [API Index of the Grid](https://www.telerik.com/kendo-angular-ui/components/grid/api)
