---
url: https://akinozgen.github.io/datagrids/errors/DG009.md
description: >-
  One datagrids warning or error code — the message, when it happens and how to
  fix it.
---

# DG009: Module attached twice

```text
[datagrids DG009] Module `{name}` is attached twice.
```

This is a wiring mistake: the grid throws an `Error` with this message instead of half-working.

## When it happens

A module name is attached a second time: the same factory twice (`colVis()` in a preset and again on the
page) or two modules with the same `name`, such as two `button.custom({ name: "approve", … })`.

## How to fix it

Attach each module once per grid. When a [preset](/reference/static#preset) already contains a module, don't
repeat it; give custom buttons distinct names, or leave `name` out to get an automatic one.

## Related

* [All warning codes](/errors/)
* [Grid options](/reference/options)
* [Static API & configure()](/reference/static)
