Hello,
I have a an editable Datagrid Reactive that contains a text column for a description of the row item. I have set the word-wrap for the column to true using the the OnInitialize event of the grid.
That works as intended once the I click out of the cell after typing, but as I'm typing the text stays on one line and overflows. Aslo, I cannot hit "enter" or "alt+enter" to add a line break while typing.
Any suggestions as to how I might accomplish both the word wrap and manually-entered lin breaks while entering data into the cell of a text column? Any guidance would be greatly appreciated.
Hello @John Bradley
In order to achieve this you can do the following by calling a JS node in the initialize event with the following API calls:
The inputs are the Grid block identifier and the Column block identifier (the one you want to apply this behaviour).
Cheers,GM
Thank you for this. On Friday I was able to take a list and use a dynamic textarea to achieve how I wanted the text to behave, but with your help I now I have two versions of how they would like to read and edit data. I will show both to the the application owners and see which one they prefer. Thanks again!
John
Hi @John Bradley
Which version of OS DataGrid re you using? Can you please share a sample oml with this scenario so I can try to help? Have you checked in Wijmo's Flexgrid documentation any example with this working as expected? If so it would be easier and faster to help.
Hi Goncalo, unfortunately I cannot share the oml due to my department rules, but now that I realize that this is based off of Wijmo's Flexgrid I will look at the documentation. I basically want the cell in the text column to act like a textarea when the user is typing in it.
Thank you,
Hi John Bradley ,
try this, put this css in your screen css or theme.
.wj-cell {
white-space: initial;
overflow-wrap: anywhere;
}
Thanks
Prince
Hi Prince, thank you for the suggestion. Unfortunately, I already tried this and it did not work for me. It seems like all of the style settings mostly pertain to the display of data after the data is typed. I basically want the cell in the text column to act like a textarea when the user is typing in it.
hi John,
Try with this oml.