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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ResizeToFit isn''t taking bold text into account

Thread ID:





38429 Dec 13,2005 01:29 AM UTC Apr 5,2006 04:34 AM UTC WinForms 6
Tags: GridControl
Michael Scott
Asked On December 13, 2005 01:29 AM UTC

I''ve got a standard grid that I only populate programatically. The last row/column is in bold text - and are my row/column totals. The numbers in this last row/column are both disabled, and bold. The call : gridCtl.Model.ColWidths.ResizeToFit( GridRangeInfo.Table()); works if the cells are not bold, but if that row/column ARE bold, then the numbers get cut off. Is there an easy way around this? I looked into various combinations of using the GridResizeToFitOptions argument, but perhaps I did not stumble upon the correct combination. Michael

stanleyj [Syncfusion]
Replied On December 13, 2005 05:42 AM UTC

Hi Michael, I did not find any issues in this sample. Can you see any issues? Thanks, Stanley

stanleyj [Syncfusion]
Replied On December 13, 2005 05:47 AM UTC

Hi Michael, Sorry for the broken link. http://www.syncfusion.com/Support/user/uploads/Forum_38429_a4d41a98.zip Regards, Stanley

Administrator [Syncfusion]
Replied On December 13, 2005 07:01 PM UTC

Your example worked - but was the same as mine. Oddly enough, I finally used the following, and it *did* work : gridCtl.Model.ColWidths.ResizeToFit( GridRangeInfo.Cells(0,0,Rows,Cols)); Table() did not though. I''m computing my totals manually - could you explain how you used "=SUM"? Michael

stanleyj [Syncfusion]
Replied On December 14, 2005 05:33 AM UTC

Hi Michael, Essential Grid has a formula cell type that allows a cell to host a formula. You have the option of using a formula cell for the whole grid, or just for some grid cells. this.gridControl1.ColStyles[10].CellType = "FormulaCell"; For more details refer windows\Grid.Windows\Samples\Quick Start\FormulaGrid Best regards, Stanley

Michael Scott
Replied On April 5, 2006 12:11 AM UTC

I''m still having problems with my bottom row not getting resized correctly. I have some values that would fit if my last row were not bold, but when bold, the last character is being cut off. I''m using the following to resize my columns : // 11. Set column width this.gridCtl.Model.ColWidths.ResizeToFit( GridRangeInfo.Cells(0, 0,this.gridRows, this.gridCols)); I''ve used GridResizeToFitOptions options to make a difference, but haven''t found a good combination to accomplish this. Attached is an example. Look at columns 5, 9, and 20. Any suggestions? Michael


Administrator [Syncfusion]
Replied On April 5, 2006 04:34 AM UTC

Hi Michael, Since we are not able to reproduce the mentioned issue here, can you please reproduce the issue in the sample that Stanley had sent or in a new sample and sent it back so that we can get back soon with a solution. Please also make sure that the this.gridRows and this.gridCols have the proper row and column count. Regards, Calvin.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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