# Datagrid text wrapping

**URL:** <https://community.weweb.io/t/datagrid-text-wrapping/10373>\
**Category:** Ask us anything\
**Created:** [August 21, 2024, 7:43pm UTC](https://community.weweb.io/t/datagrid-text-wrapping/10373 "2024-08-21T19:43:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kat\_worlded](https://avatars.discourse-cdn.com/v4/letter/k/919ad9/32.png) [@kat\_worlded](https://community.weweb.io/u/kat_worlded)\
**Post date:** [August 21, 2024, 7:43pm UTC](https://community.weweb.io/t/datagrid-text-wrapping/10373/1 "2024-08-21T19:43:25Z")

</div>

Any advice for forcing a datagrid text field to wrap the text and adjust the row size as appropriate? I have “No wrap” turned off, I’ve tried turning it on/off to reset but the text just keeps bleeding into the next column. I’ve set the column widths and that’s working ok but I cannot get the text to wrap to the next line rather than being invisible.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/7/70669778d3f9998dc304ba31e4e07b6f2f628d9b.png)

---

<div class="post-metadata">

**Author:** ![jptrinh](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/jptrinh/32/1493_2.png) [@jptrinh](https://community.weweb.io/u/jptrinh)\
**Post date:** [August 27, 2024, 6:49am UTC](https://community.weweb.io/t/datagrid-text-wrapping/10373/2 "2024-08-27T06:49:35Z")

</div>

Hey @kat_worlded  
You’d need to turn those elements to Long answer type (instead of Short answer). It will turn it to a textarea element that handles text-wrapping.  
The issue remaining is that the height won’t be automatic based on the content.  
One way to do that is to bind the height of the element to a formula that calculates the height of the content (`context.thisInstance .children[0].scrollHeight+"px"`) but on page resize, the height remains the same. So you’d need to listen to that (else, a scrollbar or white-space will appear).
