# Data Grid: Fixing (holding position) of a certain column

**URL:** <https://forum.servoy.com/t/data-grid-fixing-holding-position-of-a-certain-column/21326>\
**Category:** Questions\
**Created:** [November 14, 2024, 10:51am UTC](https://forum.servoy.com/t/data-grid-fixing-holding-position-of-a-certain-column/21326 "2024-11-14T10:51:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![huber](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/huber/32/5042_2.png) [@huber](https://forum.servoy.com/u/huber)\
**Post date:** [November 14, 2024, 10:51am UTC](https://forum.servoy.com/t/data-grid-fixing-holding-position-of-a-certain-column/21326/1 "2024-11-14T10:51:51Z")

</div>

On a Data Grid which allows moving of columns, I’d like to fix (hold position) for one (or two) columns. For example I would like to fix the far most left (or fa most right) column. Is this possible?

Regads,

---

<div class="post-metadata">

**Author:** ![kwpsd](https://avatars.discourse-cdn.com/v4/letter/k/bb73d2/32.png) [@kwpsd](https://forum.servoy.com/u/kwpsd)\
**Post date:** [November 14, 2024, 7:25pm UTC](https://forum.servoy.com/t/data-grid-fixing-holding-position-of-a-certain-column/21326/2 "2024-11-14T19:25:57Z")

</div>

Hi, Robert.

Try disabling the grid header setting **enableColumnMove**.

[attachment=0]grid\_columnb\_setting\_move.png[/attachment]

 ![grid_columnb_setting_move.png](https://canada1.discourse-cdn.com/flex010/uploads/servoy/original/2X/c/ceadda176e7c611eab069524379883a1108681c2.png)

---

<div class="post-metadata">

**Author:** ![huber](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/huber/32/5042_2.png) [@huber](https://forum.servoy.com/u/huber)\
**Post date:** [November 15, 2024, 7:12am UTC](https://forum.servoy.com/t/data-grid-fixing-holding-position-of-a-certain-column/21326/3 "2024-11-15T07:12:30Z")

</div>

Hi Kim

Good morning and thanks for your answer. Disabling column move affects all columns of the grid, whereas I’d like to disable one specific column of the grid from being moved. Couldn’t find that but may be I overlooked something.

Best regards

---

<div class="post-metadata">

**Author:** ![seain](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/seain/32/4511_2.png) [@seain](https://forum.servoy.com/u/seain)\
**Post date:** [November 18, 2024, 12:05am UTC](https://forum.servoy.com/t/data-grid-fixing-holding-position-of-a-certain-column/21326/4 "2024-11-18T00:05:46Z")

</div>

You can lock the position of columns to the left or right by setting the ‘lockPosition’ columnDef property to either ‘left’ or ‘right’.

> **[JavaScript Grid: Column Options Reference | AG Grid](https://www.ag-grid.com/javascript-data-grid/column-properties/#reference-display-lockPosition)**
>
> Column Options Reference for JavaScript Data Grid. Browse all Column Properties used to configure Columns and Column Groups. Lists properties, types and defaults. Download AG Grid v33.1.1 today: The best JavaScript Table & JavaScript Data Grid in...

[attachment=0]columnDef\_lockPosition.png[/attachment]

 ![columnDef_lockPosition.png](https://canada1.discourse-cdn.com/flex010/uploads/servoy/original/2X/7/74932d693a60eba473c98f2aba445aaa0513d286.png)

---

<div class="post-metadata">

**Author:** ![huber](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/huber/32/5042_2.png) [@huber](https://forum.servoy.com/u/huber)\
**Post date:** [November 26, 2024, 10:37am UTC](https://forum.servoy.com/t/data-grid-fixing-holding-position-of-a-certain-column/21326/5 "2024-11-26T10:37:36Z")

</div>

Thanks Seain, your solution solved my problem ![:-)]( "Smile")
