Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
330
Word Wrapping in UltraGrid
posted

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

 

 

 

Parents
No Data
Reply
  • 469350
    Offline posted

    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.

Children