Replied 8 September 2017, 12:50 am EST
Hello,
1. You should set the autoFitType before calling the autoFitRow or autoFitColumn method, so as to autofit the headers along with the rows and columns.
2. However, as mentioned in the forum link provided by you earlier:
http://wijmo.com/reply/reply-to-how-can-i-set-autofitrow-for-a-header-row-3/, the autoFit feature of SpreadJS either changes the height of the viewport rows, including the row header or changes the width of the viewport columns including the column headers to display the complete text. However, it does not supports changing the height of the column header row to display the complete text.
Further, the argument passed to the autoFitRow method is the index of the viewport row and not the column header row.Hence, the issue that you are currently observing is the intended behaviour of Spread, where in the height of the column header row is not autofit when calling the "autoFitRow" method.
Further, the "getAutoFitHeight" method is used to get the height of a custom cell and cannot be used in this scenario. So, you would need to manually calculate the height required to display the complete text in the column header and later set the same as the row height by using the “setRowHeight” method.
Hope it helps.
Thanks,
Manpreet Kaur