Hi,
I want to display the cell's text automatically using multiline, without the need to adjust the height using the mouse.
Here is a picture of my problem :
I needed to manually(using mouse) adjust the height of the row to let the text display in multiline, and as you can see, the height of every rows got updated.
I was thinking of using the column.MaxWidth value on the column i want to update and using an event after the cell value is updated to validate the text length and then modify the line height, if that is possible?
Am I on the right path? Any hints to give me? I can't seem to find the place to set the height of a specific line.
There's nothing to it:
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { UltraGridLayout layout = e.Layout; UltraGridOverride ov = layout.Override; ov.RowSizing = RowSizing.AutoFree; }
You could also use AutoFixed, if you prefer that the user not be allowed to resize the rows.
If something changes and you need to refresh the row height, you can call row.PerformAutoSize().
Thx,
RowSizing.Free
CellMultiLine = True
Row.PerformAutoSize
Did the job nicely. Thanks! :)