I would like to get the rows inside the grid to auto size to the verticle
height so that the grid boarder does not cut a row off in the middle
The AutofitStyle for columns is set correctly for all columns
There's no built-in way to auto-size the rows to fit the height of the grid. It seems like an odd thing to do, since this would almost certainly cause the text in the rows to be unreadable - since the height of the row could be too small for the text to fit.
You can, of course, attempt to calculate the height yourself and then set the Height of the rows. It would be pretty tricky, because you would have to account for the headers and borders on each row - and sometimes the borders overlap.
You will also need to set the MininumHeight on the row in order to allow the row height to be smaller then the default, which is based on the font size.
I have the same issue the customer wants the gird to act like a web table and just expand to the data.
in this case the data is being cut in half in the middle of the row.
Each row is multiline and has different heights
How could I solve this problem?
UltraGrid1.DisplayLayout.Bands(0).Columns(YOUR_COLUMN_NUMBER_HERE).CellMultiLine = Infragistics.Win.DefaultableBoolean.True
this.ultraGrid1.DisplayLayout.Override.RowSizing = RowSizing.AutoFree;
Here is what is needed
'Set the gird Rowsizing to Free
e.Layout.Override.RowSizing = UltraWinGrid.RowSizing.Free
'In the iniitialize row of the Grid loop through each row adjusting the height of that row
grd.InitializeRow
String
Integer
sText = e.Row.Cells(
).Text()
Then
iRowHeight = Len(sText) / 18
e.Row.Cells(
).Column.CellMultiLine = DefaultableBoolean.True
e.Row.PerformAutoSize()
Else
iRowHeight = 1
).Column.CellMultiLine = DefaultableBoolean.False
If
e.Row.Height = iRowHeight * 15
Sub
http://forums.infragistics.com/forums/p/16955/61623.aspx#61623