ResizeToFit isn''t taking bold text into account
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
SIGN IN To post a reply.
6 Replies
ST
stanleyj
Syncfusion Team
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
ST
stanleyj
Syncfusion Team
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
AD
Administrator
Syncfusion Team
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
ST
stanleyj
Syncfusion Team
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
MS
Michael Scott
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
matrix0.zip
matrix0.zip
AD
Administrator
Syncfusion Team
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.
SIGN IN To post a reply.
- 6 Replies
- 3 Participants
-
MS Michael Scott
- Dec 13, 2005 01:29 AM UTC
- Apr 5, 2006 04:34 AM UTC