Word wrapping in grid cells

Hi



is there a way to wrap text in a grid cell of type ‘ro’



for example. if i have a cell that is approx 100px in width and i have text that is longer than that, i want the height of the cell to expand and create rows out of the text, so instead of appearing on 1 line it appears on 2 or more (depending on how many it needs)



is this possible?



thanks

You can use multiline mode of grid. In such mode data will be auto-wrapped for all cells in grid.
grid.enableMultiline(true);

this works fine, except the height of single rows seems to have shrunk considerably, and the rows are now very close up. is there a way to change the padding on the cells so they have the same amount of space as they would have without the multi-line being enabled?

if i have to change the css or js can you point me to the line to change please

thanks

In multiline mode, height of row defined barely by content, it has not extra spacing as in default mode ( where height of row is fixed )
You can change the default height of rows by adding next css rule


div.gridbox table.obj td {
padding-top:2px;
padding-bottom:2px;
}


thanks for this, except where exactly should i add this?

thanks

Anywhere in your HTML file , after including standard grid’s css
( or you can add it to the end of existing dhtmlxgrid.css )

thanks for your help, this works well!