I have a row template with three cells.
/---------------------------------------------------\
| ICON | TITLE (one line, no wrap) |
|----------+----------------------------------------|
| | DESCRIPTION (with wrap, can potentially|
| | need additional lines if the text is |
| | really long) |
\---------------------------------------------------/
If descriptions are null, I want the table to look like this:
/---------------------------------------------------\
| ICON | The first title |
|----------+----------------------------------------|
| ICON | The second title |
|----------+----------------------------------------|
| ICON | The third title |
|----------+----------------------------------------|
| ICON | The fourth title |
|----------+----------------------------------------|
| ICON | The fifth title |
\----------+----------------------------------------/
i.e. I want the item height to show only those two cells, as if there was nothing else.
But if some items have non-null descriptions, then I want them to be shown, with automatic wrapping and automatically adjusted item height.
/---------------------------------------------------\
| ICON | The first title |
| | description line 1 |
|----------+----------------------------------------|
| ICON | The second title |
| | description line 1 |
| | description line 2 |
|----------+----------------------------------------|
| ICON | The third title |
| | description line 1 |
| | description line 2 |
| | description line 3 |
|----------+----------------------------------------|
| ICON | The fourth title |
|----------+----------------------------------------|
| ICON | The fifth title |
\----------+----------------------------------------/
My real question is: is this supposed to work at all, or is it a limitation of the autoheight feature that it doesn't actually support grids with RowTemplates? If it is, then what do I need to do apart from:
- TextCell.setWrap(true)
- Grid.setAutoHeight(true)
- GridColumn.setWordWrap(true)