---
title: "Provided Cell Editors"
framework: vue
version: "36.1.0"
---

# Provided Cell Editors

The grid comes with some cell editors provided out of the box. These cell editors are listed here.

- [Text Cell Editor](https://www.ag-grid.com/vue-data-grid/provided-cell-editors-text/)
- [Large Text Cell Editor](https://www.ag-grid.com/vue-data-grid/provided-cell-editors-large-text/)
- [Select Cell Editor](https://www.ag-grid.com/vue-data-grid/provided-cell-editors-select/)
- [Rich Select Cell Editor](https://www.ag-grid.com/vue-data-grid/provided-cell-editors-rich-select/)  (Enterprise)
- [Formula Cell Editor](https://www.ag-grid.com/vue-data-grid/formula-editor-component/)  (Enterprise)

There are also some additional cell editors that are generally used with [Cell Data Types](https://www.ag-grid.com/vue-data-grid/cell-data-types/):

- [Number Cell Editor](https://www.ag-grid.com/vue-data-grid/provided-cell-editors-number/)
- [Date Cell Editor](https://www.ag-grid.com/vue-data-grid/provided-cell-editors-date/)
- [Checkbox Cell Editor](https://www.ag-grid.com/vue-data-grid/provided-cell-editors-checkbox/)

## Example - Provided Cell Editors

#### Editors

```ts
import {
  createApp,
  defineComponent,
  onBeforeMount,
  ref,
  shallowRef,
} from "vue";
import { AgGridVue } from "ag-grid-vue3";
import {
  ClientSideRowModelModule,
  ColDef,
  ColGroupDef,
  GridApi,
  GridOptions,
  GridReadyEvent,
  ILargeTextEditorParams,
  IRichCellEditorParams,
  ISelectCellEditorParams,
  ITextCellEditorParams,
  LargeTextEditorModule,
  ModuleRegistry,
  SelectEditorModule,
  TextEditorModule,
  enableDevValidations,
} from "ag-grid-community";
import { RichSelectModule } from "ag-grid-enterprise";
import ColourCellRenderer from "./colourCellRendererVue";
import { colors } from "./colors";
if (process.env.NODE_ENV !== "production") {
  enableDevValidations();
}

ModuleRegistry.registerModules([
  ClientSideRowModelModule,
  RichSelectModule,
  SelectEditorModule,
  TextEditorModule,
  LargeTextEditorModule,
]);

function getRandomNumber(min: number, max: number) {
  // min and max included
  return Math.floor(window.agRandom() * (max - min + 1) + min);
}

const data = Array.from(Array(20).keys()).map(() => {
  const color = colors[getRandomNumber(0, colors.length - 1)];
  return {
    color1: color,
    color2: color,
    color3: color,
    description:
      "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
  };
});

const VueExample = defineComponent({
  template: `
        <div style="height: 100%">
                <ag-grid-vue
      style="width: 100%; height: 100%;"
      @grid-ready="onGridReady"
      :columnDefs="columnDefs"
      :defaultColDef="defaultColDef"
      :rowData="rowData"></ag-grid-vue>
        </div>
    `,
  components: {
    "ag-grid-vue": AgGridVue,
    ColourCellRenderer,
  },
  setup(props) {
    const gridApi = shallowRef<GridApi | null>(null);
    const columnDefs = ref<ColDef[]>([
      {
        headerName: "Text Editor",
        field: "color1",
        cellRenderer: "ColourCellRenderer",
        cellEditor: "agTextCellEditor",
        cellEditorParams: {
          maxLength: 20,
        } as ITextCellEditorParams,
      },
      {
        headerName: "Select Editor",
        field: "color2",
        cellRenderer: "ColourCellRenderer",
        cellEditor: "agSelectCellEditor",
        cellEditorParams: {
          values: colors,
        } as ISelectCellEditorParams,
      },
      {
        headerName: "Rich Select Editor",
        field: "color3",
        cellRenderer: "ColourCellRenderer",
        cellEditor: "agRichSelectCellEditor",
        cellEditorParams: {
          values: colors,
          cellRenderer: "ColourCellRenderer",
          filterList: true,
          searchType: "match",
          allowTyping: true,
          valueListMaxHeight: 220,
        } as IRichCellEditorParams,
      },
      {
        headerName: "Large Text Editor",
        field: "description",
        cellEditorPopup: true,
        cellEditor: "agLargeTextCellEditor",
        cellEditorParams: {
          maxLength: 250,
          rows: 10,
          cols: 50,
        } as ILargeTextEditorParams,
        flex: 2,
      },
    ]);
    const defaultColDef = ref<ColDef>({
      flex: 1,
      editable: true,
    });
    const rowData = ref<any[] | null>(data);

    const onGridReady = (params: GridReadyEvent) => {
      gridApi.value = params.api;
    };

    return {
      gridApi,
      columnDefs,
      defaultColDef,
      rowData,
      onGridReady,
    };
  },
});

const app = createApp(VueExample);
app.mount("#app");
```

[Live example: Editors](https://www.ag-grid.com/examples/provided-cell-editors/editors/vue3)

## Example - Cell Data Types Cell Editors

#### Cell Data Type Editors

```ts
import {
  createApp,
  defineComponent,
  onBeforeMount,
  ref,
  shallowRef,
} from "vue";
import { AgGridVue } from "ag-grid-vue3";
import {
  CheckboxEditorModule,
  ClientSideRowModelModule,
  ColDef,
  ColGroupDef,
  DateEditorModule,
  GridApi,
  GridOptions,
  GridReadyEvent,
  INumberCellEditorParams,
  ModuleRegistry,
  NumberEditorModule,
  ValueFormatterParams,
  enableDevValidations,
} from "ag-grid-community";
if (process.env.NODE_ENV !== "production") {
  enableDevValidations();
}

ModuleRegistry.registerModules([
  ClientSideRowModelModule,
  NumberEditorModule,
  DateEditorModule,
  CheckboxEditorModule,
]);

const data = Array.from(Array(20).keys()).map((val: any, index: number) => ({
  number: index,
  date: new Date(2023, 5, index + 1),
  dateString: `2023-06-${index < 9 ? "0" + (index + 1) : index + 1}`,
  boolean: !!(index % 2),
}));

const VueExample = defineComponent({
  template: `
        <div style="height: 100%">
                <ag-grid-vue
      style="width: 100%; height: 100%;"
      @grid-ready="onGridReady"
      :columnDefs="columnDefs"
      :defaultColDef="defaultColDef"
      :rowData="rowData"></ag-grid-vue>
        </div>
    `,
  components: {
    "ag-grid-vue": AgGridVue,
  },
  setup(props) {
    const gridApi = shallowRef<GridApi | null>(null);
    const columnDefs = ref<ColDef[]>([
      {
        headerName: "Number Editor",
        field: "number",
        cellEditor: "agNumberCellEditor",
        cellEditorParams: {
          precision: 0,
        } as INumberCellEditorParams,
      },
      {
        headerName: "Date Editor",
        field: "date",
        valueFormatter: (params: ValueFormatterParams<any, Date>) => {
          if (!params.value) {
            return "";
          }
          const month = params.value.getMonth() + 1;
          const day = params.value.getDate();
          return `${params.value.getFullYear()}-${month < 10 ? "0" + month : month}-${day < 10 ? "0" + day : day}`;
        },
        cellEditor: "agDateCellEditor",
      },
      {
        headerName: "Date as String Editor",
        field: "dateString",
        cellEditor: "agDateStringCellEditor",
      },
      {
        headerName: "Checkbox Cell Editor",
        field: "boolean",
        cellEditor: "agCheckboxCellEditor",
      },
    ]);
    const defaultColDef = ref<ColDef>({
      flex: 1,
      editable: true,
    });
    const rowData = ref<any[] | null>(data);

    const onGridReady = (params: GridReadyEvent) => {
      gridApi.value = params.api;
    };

    return {
      gridApi,
      columnDefs,
      defaultColDef,
      rowData,
      onGridReady,
    };
  },
});

const app = createApp(VueExample);
app.mount("#app");
```

[Live example: Cell Data Type Editors](https://www.ag-grid.com/examples/provided-cell-editors/cell-data-type-editors/vue3)
