GetPreferredRowHeight doesn’t adjust row height properly on XP or window 2008 server.

Posted by: rhondazheng on 8 September 2017, 2:24 pm EST

  • Posted 8 September 2017, 2:24 pm EST

    <P style="MARGIN:0in 0in 10pt;" class=MsoNormal><SPAN style="LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';FONT-SIZE:10pt;mso-no-proof:yes;">GetPreferredRowHeight doesn’t adjust row height properly on XP or window 2008 server. Any idea is appreicated.<o:p></o:p></SPAN></P>
    <P style="MARGIN:0in 0in 10pt;" class=MsoNormal><SPAN style="LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';FONT-SIZE:10pt;mso-no-proof:yes;">Here is the code example, the spreadsheet column width and height are adjusted properly on Window 7, all of the text message are wrapped and show properly. But not XP or 2008 server, the text message is not wrapped, only the first line of text is displayed, second line of text is hidden.<o:p></o:p></SPAN></P>
    <P style="MARGIN:0in 0in 10pt;" class=MsoNormal><SPAN style="LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';FONT-SIZE:10pt;mso-no-proof:yes;">ssh.ActiveSheet.SetRowHeight(5, (<SPAN style="COLOR:blue;">int</SPAN>)sshResources.ActiveSheet.GetPreferredRowHeight(5,<SPAN style="COLOR:blue;">false</SPAN>,<SPAN style="COLOR:blue;">false</SPAN>));<o:p></o:p></SPAN></P>
    <P style="LINE-HEIGHT:normal;MARGIN:0in 0in 0pt;mso-layout-grid-align:none;" class=MsoNormal><SPAN style="FONT-FAMILY:'Courier New';FONT-SIZE:10pt;mso-no-proof:yes;">FarPoint.Win.Spread.CellType.<SPAN style="COLOR:#2b91af;">TextCellType</SPAN> cellType = <SPAN style="COLOR:blue;">new</SPAN> FarPoint.Win.Spread.CellType.<SPAN style="COLOR:#2b91af;">TextCellType</SPAN>();<o:p></o:p></SPAN></P>
    <P style="LINE-HEIGHT:normal;MARGIN:0in 0in 0pt;mso-layout-grid-align:none;" class=MsoNormal><SPAN style="FONT-FAMILY:'Courier New';FONT-SIZE:10pt;mso-no-proof:yes;">cellType.Static = <SPAN style="COLOR:blue;">true</SPAN>;<o:p></o:p></SPAN></P>
    <P style="MARGIN:0in 0in 10pt;" class=MsoNormal><SPAN style="LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';FONT-SIZE:10pt;mso-no-proof:yes;">cellType.WordWrap = <SPAN style="COLOR:blue;">true</SPAN>;<o:p></o:p></SPAN></P>
    <P style="MARGIN:0in 0in 10pt;" class=MsoNormal><SPAN style="LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';FONT-SIZE:10pt;mso-no-proof:yes;">ssh.GetCurrentCell().CellType = cellType;<o:p></o:p></SPAN></P>
    <P style="MARGIN:0in 0in 10pt;" class=MsoNormal><SPAN style="mso-no-proof:yes;"></SPAN><o:p></o:p></P>
    <P style="MARGIN:0in 0in 10pt;" class=MsoNormal><o:p><FONT size=3 face=Calibri> </FONT></o:p></P>
    <P style="MARGIN:0in 0in 10pt;" class=MsoNormal><SPAN style="mso-no-proof:yes;"></P>
    <P style="MARGIN:0in 0in 10pt;" class=MsoNormal><SPAN style="LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';FONT-SIZE:10pt;mso-no-proof:yes;">GetPreferredRowHeight doesn’t adjust row height properly on XP or window 2008 server. Any idea is appreicated.<o:p></o:p></SPAN></P>
    <P style="MARGIN:0in 0in 10pt;" class=MsoNormal><SPAN style="LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';FONT-SIZE:10pt;mso-no-proof:yes;">Here is the code example, the spreadsheet column width and height are adjusted properly on Window 7, all of the text message are wrapped and show properly. But not XP or 2008 server, the text message is not wrapped, only the first line of text is displayed, second line of text is hidden.<o:p></o:p></SPAN></P>
    <P style="MARGIN:0in 0in 10pt;" class=MsoNormal><SPAN style="LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';FONT-SIZE:10pt;mso-no-proof:yes;">ssh.ActiveSheet.SetRowHeight(5, (<SPAN style="COLOR:blue;">int</SPAN>)sshResources.ActiveSheet.GetPreferredRowHeight(5,<SPAN style="COLOR:blue;">false</SPAN>,<SPAN style="COLOR:blue;">false</SPAN>));<o:p></o:p></SPAN></P>
    <P style="LINE-HEIGHT:normal;MARGIN:0in 0in 0pt;mso-layout-grid-align:none;" class=MsoNormal><SPAN style="FONT-FAMILY:'Courier New';FONT-SIZE:10pt;mso-no-proof:yes;">FarPoint.Win.Spread.CellType.<SPAN style="COLOR:#2b91af;">TextCellType</SPAN> cellType = <SPAN style="COLOR:blue;">new</SPAN> FarPoint.Win.Spread.CellType.<SPAN style="COLOR:#2b91af;">TextCellType</SPAN>();<o:p></o:p></SPAN></P>
    <P style="LINE-HEIGHT:normal;MARGIN:0in 0in 0pt;mso-layout-grid-align:none;" class=MsoNormal><SPAN style="FONT-FAMILY:'Courier New';FONT-SIZE:10pt;mso-no-proof:yes;">cellType.Static = <SPAN style="COLOR:blue;">true</SPAN>;<o:p></o:p></SPAN></P>
    <P style="MARGIN:0in 0in 10pt;" class=MsoNormal><SPAN style="LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';FONT-SIZE:10pt;mso-no-proof:yes;">cellType.WordWrap = <SPAN style="COLOR:blue;">true</SPAN>;<o:p></o:p></SPAN></P>
    <P style="MARGIN:0in 0in 10pt;" class=MsoNormal><SPAN style="LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';FONT-SIZE:10pt;mso-no-proof:yes;">ssh.GetCurrentCell().CellType = cellType;</SPAN></P>
    <P style="MARGIN:0in 0in 10pt;" class=MsoNormal></SPAN><o:p></o:p></P>
  • Replied 8 September 2017, 2:24 pm EST

    <p>Hello,</p><p>We are unable to replicate the issue at my end with Spread's latest version 4.0.3522.2008 wherein on using the code provided by you I am able to get the RowHeight of the row adjusted properly.</p><p>Please have a look at the attached images and let us know what are we missing to replicate the issue and if possible please send us a running sample for us to debug the issue at my end.</p><p>And here is the code i used to test the issue:-</p><blockquote><p>            FarPoint.Win.Spread.CellType.TextCellType cellType = new FarPoint.Win.Spread.CellType.TextCellType(); <br>            cellType.WordWrap = true; <br>            fpSpread1_Sheet1.Columns[0].CellType = cellType; <br>            fpSpread1_Sheet1.Cells[0, 0].Text = "Long texttttttt long textttttt... longggg"; <br>            fpSpread1_Sheet1.SetRowHeight(0, (int)fpSpread1_Sheet1.GetPreferredRowHeight(0, false, false));</p></blockquote><p>Feel free to ask contact us for further clarification. Thanks.<br></p>
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels