# How to create index column in data grid?

**URL:** <https://community.weweb.io/t/how-to-create-index-column-in-data-grid/5350>\
**Category:** How do I?\
**Tags:** data-grid\
**Created:** [November 11, 2023, 12:09pm UTC](https://community.weweb.io/t/how-to-create-index-column-in-data-grid/5350 "2023-11-11T12:09:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lamalarek](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/lamalarek/32/6014_2.png) [@lamalarek](https://community.weweb.io/u/lamalarek)\
**Post date:** [November 11, 2023, 12:09pm UTC](https://community.weweb.io/t/how-to-create-index-column-in-data-grid/5350/1 "2023-11-11T12:09:29Z")

</div>

Hi guys!

I would like to create a column in datagrid element which would display consecutive numbers for each row - index column (not from database collection). Is there a formula for such a case? I’ve tried to find a solution for many hours without success. Could someone please suggest how to do it? Thank you.

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [November 11, 2023, 12:17pm UTC](https://community.weweb.io/t/how-to-create-index-column-in-data-grid/5350/2 "2023-11-11T12:17:45Z")

</div>

Add a custom column like this

 ![Screenshot 2023-11-11 at 13.16.12](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/3/3fafe47e37169a0cca57c4782d8f0f54499174ad.png)

Inside the dropzone in your column, place text element.

 ![Screenshot 2023-11-11 at 13.16.51](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/8/85e2b674e15106b20ceb3ad8c7677ae201d1e8d3.png)

Bind the text element to the following

 ![Screenshot 2023-11-11 at 13.17.10](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/2/2a06112fb21b5c27ca5f7e1bd0cb2c5f25fcdd0a.jpeg)

Enjoy

 ![Screenshot 2023-11-11 at 13.17.35](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/3/3e86390893baa8ca291c6c8d55b9003aec3f006d.jpeg)

---

<div class="post-metadata">

**Author:** ![lamalarek](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/lamalarek/32/6014_2.png) [@lamalarek](https://community.weweb.io/u/lamalarek)\
**Post date:** [November 11, 2023, 3:43pm UTC](https://community.weweb.io/t/how-to-create-index-column-in-data-grid/5350/3 "2023-11-11T15:43:34Z")

</div>

Hi Roberto!

Thank you so much for your engagement in my problem. That is exactly what I did as a first solution but I didn’t use a text field inside a cell and in the end I got “undefined” message in this column. Your suggestion works perfectly. Once again thank you so much.
