Aspose Cells GridJs - TextWrapping is not auto adjusting height of row

I’ve noticed a significant issue with the TextWrap functionality in the Aspose Cells GridJS control, which affects usability in my case.

When a cell has the textWrap style enabled and a long text is entered, after confirming the input, the cell does not automatically adjust its row height. As a result, the entered text is not visible, and the worksheet becomes unreadable.

I would expect behavior similar to Microsoft Excel – when longer text is entered into a wrapped cell, the row height should automatically adjust so that the full content is visible.

I’m attaching a sample file to demonstrate the issue. Cells B2 and B3 appear correctly when the sheet is opened. However, when I enter a long text into cell B4, the behavior is incorrect – the cell does not resize to show the full content, despite text wrapping being applied.

Is it possible to fix this behavior quickly?
Alternatively, would it be possible to implement a custom JavaScript function that adjusts the row height on a cell focus change event (e.g., to a defined height)? That would at least provide a temporary workaround.
Example COPY.zip (10,1 KB)

@klep
We are sorry,currently we don’t support auto adjust row height after enter text.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSGRIDJS-1662

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Thank you for the quick response.
I have a follow-up question: Is there currently any way to use a JavaScript function to manually set the height of a specific cell? Is there any way to do this?

@klep
Yes, you can set the height of specific rows using the following code.

xs.sheet.data.rows.setHeight(0,30)  // set the first row height to 30
xs.sheet.table.render()

Thank you for your reply. The provided function does allow me to change the row height.
However, I noticed that after using it, the vertical scrollbar does not update.
Is there a function to refresh the scrollbar so that I can scroll down the sheet properly after changing the row height?

@klep,

Could you please share some screenshots or a demo video to illustrate the issue with the vertical scrollbar not updating after the row heights are modified? We’ll investigate the issue soon.

example1.png (176,1 KB)

example2.png (185,6 KB)

example2.png (185,6 KB)

example4.png (196,3 KB)

I’m attaching screenshots of the incorrect case. I’m using the file Example Copy.xlsx for this.

The file named example1.png shows the initial state. Then, in the screenshot example2.png, I execute the following instructions:

xs.sheet.data.rows.setHeight(4, 500);
xs.sheet.table.render();

After this operation, I get the view shown in Example3.png, with row number 4 expanded to 500px. In this case, there is an issue — the vertical scrollbar on the right side is not visible. It’s not possible to scroll down the sheet.

Only after switching to another sheet and then returning to the current one does the scrollbar become visible again (see Example4.png).

@klep,

Thanks for the screenshots with details.

We noticed the issue. It seems vertical scrollbar is not updated after modifying the row height. We require thorough evaluation of the issue. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSGRIDJS-1665

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Thank you. Is there any temporary workaround to force the scrollbar to refresh, for example through some indirect event?
This would help me implement a temporary solution while waiting for the final fix.

@klep
Sorry about the scrollbar issue you encountered while running. We are still investigating the problem. In the meantime, you can use the following method to reset the data and make the scrollbar visible. Please try the following code.

const dataIndex = xs.datas.findIndex(d => d.sheetid === xs.sheet.data.sheetid);
xs.sheet.resetData(xs.sheet.data, dataIndex );