Hi,
I have two rows in the root collection of my grid. Due to some layout requirements I have to adjust the row height to the same row height as another grid has.
If I set the row height of grid.Rows[0] = 32, the row height of the second row also changes. The AfterRowResize-Event will only be called for the row I change the height, but the height of both rows has changed.
It looks like a bug, or do I something wrong here? The grid is bound to a UltraDataSource. I'm using version 11.1.2011.2030.
Regards
Markus
Hello Mike,
you mean looping throu all the rows of that band after displaying the column?
I have a complex setup of all my requirements and it's hard to find all such sideeffects. Why a row is resized if a columns hidden property is set? It is possible to avoid that?
That's why I'm asking you for the event. If the event AfterRowResize would be fired everytime a row gets resized, I can catch all that at one point!
Thank you.
Hi Markus,
If you are setting the Hidden property of the column to false in code, then you don't need an event, you could just autosize the row right after you set the property.
If you really want to use an event, then try the AfterColPosChanged event.
I'm still having (another) trouble with the row height. In Band[2] of my grid I have multiline cell data in the row (just one row in that band). The row height is set in the AfterCellUpdate event:
e.Cell.Row.PerformAutoSize()
So far so good. I have a hidden column in band[0], band[1] and band[2]. If I show this column setting hidden = false the row gets resized or it gets the default row height (?) and text is not fully visible anymore.
In this case, the AfterRowResize event is not fired. How I can avoid resizeing the row if columns are showed? Why the event is not fired?
The setting on the Band Override should take precedence over the Layout Override. So if you are saying that setting RowSizing to Free on the Band Override does not allow you to set the height of a single row, then something is wrong.
I tried this out and it works fine for me either way. Both of these work.
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { UltraGridLayout layout = e.Layout; UltraGridBand band = layout.Bands[0]; band.Override.RowSizing = RowSizing.Free; }
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { UltraGridLayout layout = e.Layout; UltraGridOverride ov = layout.Override; ov.RowSizing = RowSizing.Free; }
I have figured out something:
If I set RowSizing = Free on a band overrides, I can not change individual row height. If I set it to the whole grid it works:
e.Layout.Override.RowSizingArea = RowSizingArea.EntireRow;
e.Layout.Override.RowSizing = RowSizing.Free;
e.Layout.Override.CellMultiLine = DefaultableBoolean.True;
Setting at the global override, setting individual row height in band[0] or band[2] works, otherwise not.
This looks strange. Do I missunderstood something?