# Add Task Row
URL: https://pro.rv-grid.com/guides/gantt/interaction/add-task-row/
Source: src/content/docs/guides/gantt/interaction/add-task-row.mdx
Description: Use the pinned Gantt add-task row and identify it with isGanttAddTaskRow.
`GanttPlugin` can show a pinned bottom row for quickly creating tasks by typing a name into the task table.

Enable it with `taskCreateRow: true` and `allowTaskCreate: true`:

```ts
import { GanttPlugin } from '@revolist/revogrid-enterprise';

grid.plugins = [GanttPlugin];
grid.gantt = {
  ...project,
  allowTaskCreate: true,
  taskCreateRow: true,
};
```

The row is hidden when Gantt is read-only or when resource planning mode is active.

## How It Works

`GanttPlugin` installs `GanttAddTaskRowPlugin` internally. Do not add `GanttAddTaskRowPlugin` to `grid.plugins` yourself.

The internal plugin owns a draft row in the `rowPinEnd` source. That draft row is not a task entity and is not written into `grid.source`. When the user edits the `name` cell with a non-empty value, Gantt creates a new root task at the end of the project and resets the draft row.

Only the `name` cell is editable. Other cells are rendered as inert cells, row drag is disabled for the draft row, and the generated Gantt context menu is suppressed on it.

## Identifying The Draft Row

Use `isGanttAddTaskRow()` when custom columns or actions need to skip the draft row:

```ts
import {
  GanttPlugin,
  isGanttAddTaskRow,
} from '@revolist/revogrid-enterprise';
import { RowSelectPlugin } from '@revolist/revogrid-pro';

grid.plugins = [GanttPlugin, RowSelectPlugin];
grid.columns = [
  {
    prop: 'selected',
    name: '',
    rowSelect: ({ model }) => !isGanttAddTaskRow(model),
    size: 56,
    readonly: true,
    filter: false,
  },
  // Task table columns...
];
```

This is useful for checkbox selection, custom cell renderers, and application actions that should apply only to real task rows.

## Custom Context Menus

When Gantt context-menu integration is enabled, the generated row menu does not open on the add-task draft row. If your application fully disables Gantt context-menu integration and owns `rowContextMenu` itself, keep the same rule in your resolver:

```ts
grid.rowContextMenu = {
  items: [
    { name: 'Open task details', action: openTaskDetailsFromMenu },
  ],
  resolve(context) {
    if (context.triggerElement.closest('[data-gantt-add-task-row-cell="true"]')) {
      return null;
    }

    return undefined;
  },
};

grid.gantt = {
  ...project,
  contextMenu: false,
};
```

For model-based checks inside item actions, read the focused row model from the action context and pass it to `isGanttAddTaskRow()`.
