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.
Unfortunately, activation email could not send to your email. Please try again.

ResizeToFit isn''t taking bold text into account

Thread ID:

Created:

Updated:

Platform:

Replies:

38429 Dec 12,2005 08:29 PM Apr 5,2006 12:34 AM Windows Forms 6
loading
Tags: GridControl
Michael Scott
Asked On December 12, 2005 08:29 PM

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 12:42 AM

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 12:47 AM

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 02:01 PM

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 12:33 AM

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 4, 2006 08:11 PM

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

matrix0.zip

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

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.

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.

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.

;