We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

autofitrow

Thread ID:

Created:

Updated:

Platform:

Replies:

55240 Jan 25,2007 02:49 PM UTC Jan 31,2007 01:37 PM UTC WinForms 4
loading
Tags: XlsIO
Giancarlo Aguilera
Asked On January 25, 2007 02:49 PM UTC

Hi!

This is in reference to
http://www.syncfusion.com/support/Forums/message.aspx?MessageID=18534

I am experiencing this same problem. When will the fix be available


Thanks

GA

Giancarlo Aguilera
Replied On January 25, 2007 05:07 PM UTC

Oh, and by the way, my code looks like

this.Worksheet.Range[rowIndex, columnIndex].Text
= "Long Text";
this.Worksheet.Range[rowIndex, columnIndex].CellStyle.WrapText = true;
this.Worksheet.AutofitRow(rowIndex);
currentY += this.Worksheet.GetRowHeightInPixels(rowIndex)

The code snippet from the post I referenced is bit different

Thanks

GA

Melba Winshia [Syncfusion]
Replied On January 26, 2007 06:07 AM UTC

Hi Ga,

I was able to reproduce the problem. I have forwarded this issue to the development team. I will provide a time frame for fixing this issue with in a week. Sorry for the inconvenience.

Please let me know if you have any other questions.

Best Regards,
Melba


Giancarlo Aguilera
Replied On January 30, 2007 03:53 PM UTC

Hi Melba!

Unfortunately I am unable to wait for the fix. Thanks anyway.

For anyone else facing this small pickle until the fix is out, I have attached a code file that contains a helper that assists in calculating what the row height should be (CalcRowHeight) for a row taking into account cells that:
1) have text
2) do or do not have wraptext = true
3) do or do not have cell indentation
4) do or do not merge across (but NOT down)

Make sure to dispose of the helper after you're done using it, and ideally the helper should be created right before all the report generation code and disposed of immediately thereafter.

This helper is useful in cases where you need to render reports to XlsIO in a manner similar to using a printdocument, whereby you need to keep track of the currentY in order to determine if and where a new page should start. Currently I am using XlsIO as a full blown reporting tool, with each worksheet corresponding to one and only one printed page. Without this helper, I was unable to determine relatively accurate row heights, thereby preventing me from keeping track of the currentY.

Having said all of this, I would have much preferred to NOT have had to spend my friday night writing this helper, and am hoping that Syncfusion will address this soon for the sake of those of us using XlsIO as a full blown reporting tool (and it does an excellent job of that I can assure you). With my user hat on I say that this is plumbing code I have no time for.

XlsIOReportingHelper.zip

Melba Winshia [Syncfusion]
Replied On January 31, 2007 01:37 PM UTC

Hi GA,

Thanks for sharing your valuable idea with us. We will provide a time frame for fixing this issue with in two days.

Kindly let me know if you have any other questions.

Best Regards,
Melba

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;