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

    GetPreferredRowHeight doesn’t adjust row height properly on XP or window 2008 server. Any idea is appreicated.


    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.


    ssh.ActiveSheet.SetRowHeight(5, (int)sshResources.ActiveSheet.GetPreferredRowHeight(5,false,false));


    FarPoint.Win.Spread.CellType.TextCellType cellType = new FarPoint.Win.Spread.CellType.TextCellType();


    cellType.Static = true;


    cellType.WordWrap = true;


    ssh.GetCurrentCell().CellType = cellType;



     



    GetPreferredRowHeight doesn’t adjust row height properly on XP or window 2008 server. Any idea is appreicated.


    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.


    ssh.ActiveSheet.SetRowHeight(5, (int)sshResources.ActiveSheet.GetPreferredRowHeight(5,false,false));


    FarPoint.Win.Spread.CellType.TextCellType cellType = new FarPoint.Win.Spread.CellType.TextCellType();


    cellType.Static = true;


    cellType.WordWrap = true;


    ssh.GetCurrentCell().CellType = cellType;


  • Replied 8 September 2017, 2:24 pm EST

    Hello,

    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.

    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.

    And here is the code i used to test the issue:-

                FarPoint.Win.Spread.CellType.TextCellType cellType = new FarPoint.Win.Spread.CellType.TextCellType();
                cellType.WordWrap = true;
                fpSpread1_Sheet1.Columns[0].CellType = cellType;
                fpSpread1_Sheet1.Cells[0, 0].Text = "Long texttttttt long textttttt... longggg";
                fpSpread1_Sheet1.SetRowHeight(0, (int)fpSpread1_Sheet1.GetPreferredRowHeight(0, false, false));

    Feel free to ask contact us for further clarification. Thanks.

Need extra support?

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

Learn More

Forum Channels