Hi,
I want to implement the word wrapping in the ultragrid and implement using the following code
ultragrid1.DisplayLayout.Bands[0].Columns[COL_KEY_Site].CellMultiLine =
DefaultableBoolean.True;
After setting the above property,word wrap is not happening while loading,instead it take maximum length of string and display without word wrapping. but when i resize the column,word wrapping is happening.i am setting the width of cell as below
e.Layout.Bands[0].Columns[COL_KEY_Site].Width = 200;
After analysis i found the problem is from the below code
e.Layout.AutoFitStyle = Infragistics.Win.UltraWinGrid.AutoFitStyle.None;
In this case,horizontal scroll bar is coming without word wrapping. After resize and add new row,it take maximum length of string and word wrap is not happening.
When i changed the above line to
e.Layout.AutoFitStyle = Infragistics.Win.UltraWinGrid.AutoFitStyle.ResizeAllColumns;
There is no horizontal bar and when i resize one column,other column resize itself.
My requirement is to display the cell with default width and height (three no of rows) and user can change the size of the column which should not affect the other column size.
By default tool tip is displayed for each cell. I want to do word wrapping in tool tip also.Please suggest a solution.
Please help me to fix the issue.
Thanks in advance
Regards
Vijay A
Hi Vijay,
Setting CellMultiLine to true will make the text in the cell wrap to a new line, if needed as long as you are using GDI Plus (you have not set the TextRenderingMode to GDI). I'm not sure why this does not work in GDI mode.
If the column width is getting bigger to fit the text, then my guess is that you are doing this in your code. You are probably calling the PerformAutoSize method on the column to auto-size the width of the column to it's contents.
HI Mike,
Thanks Mike. I was doing PerformAutoSize for each column after load,so column width was getting bigger.
1) Is it possible to do word wrap for the default tip display for each cell.? if so,how?
2) When i resize a row manually,all the row in the gird get resized and i want to resize only the particular row only. Please suggest a solution for this.
Thanks for the solution.
a_vijay said:1) Is it possible to do word wrap for the default tip display for each cell.? if so,how?
No, there's no automatic word wrapping. Although, I think if you use UltraToolTipmanager to show tooltips, it will honor newline characters in the tooltip text.
a_vijay said:2) When i resize a row manually,all the row in the gird get resized and i want to resize only the particular row only. Please suggest a solution for this.
Set RowSizing property (on the Override) to one of the "Free" settings. it defaults to Synchronized so all rows are the same height.