> For the complete documentation index, see [llms.txt](https://docs.dikesoft.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dikesoft.com/fundamentals/grid-structure/borders.md).

# Borders

The DikeGrid itself draws a border through its primary container. However, Borders concept is essential for column moving.

## DikeGrid Border

When you disable the material elevation for the DikeGrid, it draws a line in its primary internal container.

Open the [Floating Configuration Panel](/overview.md#floating-configuration-panel), go to the **Appearance** section, and uncheck the **MatElevation** checkbox.

![Floating Configuration Panel - Appearance](https://3888584995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpDxfe6pgRLqBLMQgZ0kG%2Fuploads%2FPLCFDpJj3qDGOZjCXAVq%2Fgrid-structure-vertical-row-lines-enabled.png?alt=media\&token=4a6837bb-eb98-4d2e-9a66-8d696401b547)

![DikeGrid Border](https://3888584995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpDxfe6pgRLqBLMQgZ0kG%2Fuploads%2FqptdOlB0PMR4U6h72Uu0%2Fgrid-structure-border.png?alt=media\&token=04a2f3c3-973e-427a-85a5-4505a074ca67)

{% hint style="info" %}
By default, the border is **one-pixel** in width.
{% endhint %}

### Border width

You can change the border width by providing an Injection Token called <mark style="color:blue;">`BORDER_WIDTH`</mark>.

Let us give the DikeGrid instance this Injection Token at the module level.

{% code title="structure.module.ts" %}

```typescript
@NgModule({
  providers: [
    { provide: BORDER_WIDTH, useValue: 3 }
  ]
})
export class StructureModule { }

```

{% endcode %}

![DikeGrid with a thicker border.](https://3888584995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpDxfe6pgRLqBLMQgZ0kG%2Fuploads%2FqHE1hj7QxkAyTXL7LjZK%2Fgrid-structure-thicker-border.png?alt=media\&token=563b2981-ee96-49bd-8938-8605b6b7052d)

## Borders for column moving

If we inspect the DikeGrid instance through the Chrome DevTools, we see the following structure:

![DikeGrid Border Gap](https://3888584995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpDxfe6pgRLqBLMQgZ0kG%2Fuploads%2FRtrMUbYz9e5MJxve20JC%2Fgrid-structure-border-gap.png?alt=media\&token=03c7f98a-e6aa-47dc-abb2-058adddc75f7)

The inner container highlighted with yellow is the primary container for the DikeGrid. However, there is another outer container highlighted with pink color.

The outer container creates a space between the DikeGrid definition and its external boundary. When a column moves and tries to add to the left or right panel, this space draws a line with the accent color.

{% hint style="info" %}
Internally, the space between the DikeGrid and its external boundary is called **Border Gap**.
{% endhint %}

To see how the DikeGrid draws this line, let us allow column dragging for the DikeGrid instance.

{% hint style="success" %}
Remember that **Age** and **Gender** columns are draggable, but the DikeGrid instance that contains them must allow column dragging. See the **Column Moving** section for more details.
{% endhint %}

Let us bind the related property from the `gridProperties` object to allow column dragging.

{% code title="grid-structure.component.html" %}

```markup
<dike-grid id="grid-structure"
    [allowColumnDragging]="gridProperties.allowColumnDragging">
</dike-grid>
```

{% endcode %}

Open the [Floating Configuration Panel](/overview.md#floating-configuration-panel), go to the **Dragging** section, and check the **Allow Column Dragging** checkbox.

![Floating Configuration Panel - Dragging](https://3888584995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpDxfe6pgRLqBLMQgZ0kG%2Fuploads%2Fv8NyyoupJ0lcSqptEayo%2Fdragging-panel-conf.png?alt=media\&token=982a2a66-6959-4cc4-8515-2cbcd9d9beca)

Now you can grab the **Gender** column, for example, and drag it to the left or right panel.

![DikeGrid - Left Border](https://3888584995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpDxfe6pgRLqBLMQgZ0kG%2Fuploads%2FVsYQpIXHn34TsDqunzAV%2Fgrid-structure-border-drawn.gif?alt=media\&token=6e8d5db9-c851-48fc-a5a0-a8c0055b734a)

See how the column icon changes to a ***pin icon***, indicating that the user will add the column to the **left panel**.

{% hint style="info" %}
The drawn line is **5 pixels** in width. Nevertheless, if the provided border width exceeds 5 pixels, the drawn line will be the same as the border.
{% endhint %}

### Changing the Border Gap width

The Border Gap has **15 pixels** in width by default. However, you can reduce or increase this gap by providing an Injection Token called <mark style="color:blue;">`BORDER_GAP`</mark>.

Let us give the DikeGrid instance this Injection Token at the module level.

{% code title="structure.module.ts" %}

```typescript
@NgModule({
  providers: [
    { provide: BORDER_WIDTH, useValue: 3 },
    { provide: BORDER_GAP, useValue: 35 }
  ]
})
export class StructureModule { }
```

{% endcode %}

We gave the DikeGrid an exaggerated value of **35 pixels** to see the difference.

![Border Gap with 35 pixels in width](https://3888584995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpDxfe6pgRLqBLMQgZ0kG%2Fuploads%2FdRodhExgWi1vkTL608Ac%2Fgrid-structure-border-gap-changed.png?alt=media\&token=a6b2a26e-55a6-41eb-b431-30980e2b4c77)

{% hint style="warning" %}
Be aware that the drawn line when a column is dragging must fit in the Border Gap.
{% endhint %}
