Hi,
Text in some text cells isn''t getting wrapped in my GDBG. I''ve uploaded a screenshot. Any idea why this could be happening? This is the code I''m using to resize the row height.
this.dgTest.Model.RowHeights.ResizeToFit(GridRangeInfo.Cells(0, 1, this.dgTest.Model.RowCount, this.dgTest.Model.ColCount), GridResizeToFitOptions.IncludeHeaders);
this.dgEx.Model.RowHeights.ResizeToFit(GridRangeInfo.Cells(0, 1, this.dgEx.Model.RowCount, this.dgEx.Model.ColCount), GridResizeToFitOptions.IncludeHeaders);
Also, my column size is fixed (through the Model_QueryColWidth) event handler. Could this be why the wrapping doesn''t happen as expected?
I''ve observed that if there are a few (2-4) characters still to be fit into the cell, the GDBG doesn''t bother wrapping to the next line. It simply truncates the last 2-3 characters!!
Please respond to this ASAP. This has been nagging me for quite some time now.
Thanks,
Atith
PS: Jeba, if you''re reading this, we''d discussed this earlier. I''m unable to find the post (or am just too impatient :-)). This is the code I''m using at the moment, and though in most cases the text gets wrapped, there are certain instances, as stated above, where it doesn''t. Please clarify.
AD
Administrator
Syncfusion Team
September 27, 2005 02:05 PM UTC
Are you setting style.Wraptext = true for the columns where you want the text to be wrapped?
Here is a sample showing RowHeight.ResizeToFit working as expected.
http://www.syncfusion.com/Support/user/uploads/GDBG_WrapText_4c135124.zip
Can you modify this sample to show the problem you are having?
AM
Ahmed Mostafa
August 13, 2006 01:58 PM UTC
The problem is if the cell text contains this charachter ''-'' it will start a new line
SI
Sivakumar
Syncfusion Team
August 16, 2006 06:07 AM UTC
Hi Ahmed,
Sorry for the delay in responding to you becasue we had some difficulty in updating the forum.
I assume this is a Webform incident and not windows forms, let us know if this is a windows forms grid.I doubt because the previous updates in this topics are all of windows forms updates.
In webgrid the problem you might be encountering should be because of setting Width for the Columns, when setting the width it will wrap at "-", irrespective of the nowrap setting. Hence by not specifying the Width this issue could be solved.
Let us know if this is fine, else I will look for some other way to overcome this issue.
Thanks,
A.Sivakumar
AM
Ahmed Mostafa
August 23, 2006 08:31 AM UTC
Thanx Sivakumar
it solved the problem
>Hi Ahmed,
Sorry for the delay in responding to you becasue we had some difficulty in updating the forum.
I assume this is a Webform incident and not windows forms, let us know if this is a windows forms grid.I doubt because the previous updates in this topics are all of windows forms updates.
In webgrid the problem you might be encountering should be because of setting Width for the Columns, when setting the width it will wrap at "-", irrespective of the nowrap setting. Hence by not specifying the Width this issue could be solved.
Let us know if this is fine, else I will look for some other way to overcome this issue.
Thanks,
A.Sivakumar