Home › Forums › Guriddo Suito PHP › Set rowHeight with wrap
I have a table that has one column of text that can be up to 2048 characters in length. Is there a way to set the row height to say, 5 rows and enable the text to wrap within the cell?
The solution you requested require to add html content to your data.
This is tested and works as per your requirement:
Add the following style definition:
after the jqgrid css.
Your long data when comes from the server or local array enclose in div tag with class mylongdata
so it look like:
You can adjust your height in mylongdata depending on your needs.
or simple use cell formatter to analyse its length and enclose it in that div with the class
If you have difficulties with using cell formatter, please let us know.
Guriddo Support Team
I implemented the changes but I am getting an error. Here is my index.php file:
In my grid.php file I added the following:
The error is reported in the developer console:
What is the secret to formatting code like you did in your post above? I did it once years ago and now can’t for the life of me figure out how to do it.
Can you post a sticky post somewhere with instructions on how to post things like that in this forum?
I have simulated some long text in order to show you the solution.
Here is the demo code
Stay connected with us in your favorite flavor!
Copyright 2014 TriRand LtdAll Rights ReservedRSS