Tiago Miguel Pereira wrote:
Hello Linto Antony,
As I mentioned in my previous message, here follows a workaround type of solution.
You will need to include a Web Block containing the method that you want for setting the rows with a dynamic height resulting in something like in the image below: (This block is included in the sample attached)


Inside the Web Block you can see that we have a Javascript block containing the method responsible for formatting the cells inside the grid. We need to define which are the columns that we want to have that behavior. So we need to edit the AdvancedFormat of those columns. Feel free to change the columns according to your needs.

code:
"wordWrap: true,
multiLine: true"
Right now we need to override the method formatItems because we are explicitly defining the height of the rows inside. So in this Web Block I commented that line for you.
Remember that by using this extended feature, the method related to the formattings of the grid will get overwritten. Specifically, the method formatItem.
Hope this sample is useful if you need to extend DataGrid to have the rows with a dynamic height according to the space that the text needs so that it can be fully presented.
Hi Tiago Miguel Pereira ,
I have added the rowHeight weblock and given advanced attribute for one of the columns
I am getting the below script error in the page
Uncaught ReferenceError: sanitizeHTML is not defined
at Object.GridOS.FormattingFeature.formatItems (rowHeight.js?148564:178)
at n.gObj.grid.itemFormatter [as _itemFormatter] (GridFramework.js?148385:5259)
I have tried adding the below function at the beginning of the web block just to remove the error and removed the object references.
function sanitizeHTML(text) {
var element = document.createElement('div');
element.innerText = text;
return element.innerHTML;
}
Then the text starts appearing in multiple lines but the row height is still fixed(30px in my case)
Please help, Thanks in advance
Regards
Linto