Dear infragistics,
I have an ultraGrid (Infragistics Winform UltraGrid 12.1 with latest update) and I've manually made a data schema in the grid's designer.
I've proceeded to make a Row Layout for Band 0 like: Standard View = true, Keep Headers With Cells = true, Label Position = Left. And I've only inserted 1 column (eventually) to get the grid to do what I want. Because...
It seems it's sizing the header of the column to the content of the cell. Which is wanted in most circumstances. But in my case I have the Label Position to the Left, so I want the header to size to it's own caption.
InitializeLayout looks like:
Infragistics.Win.UltraWinGrid.UltraGrid grid = (Infragistics.Win.UltraWinGrid.UltraGrid)sender; grid.DisplayLayout.Override.AllowUpdate = Infragistics.Win.DefaultableBoolean.False; grid.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.RowSelect; grid.DisplayLayout.Override.SelectTypeRow = Infragistics.Win.UltraWinGrid.SelectType.Single; grid.DisplayLayout.PerformAutoResizeColumns(true, Infragistics.Win.UltraWinGrid.PerformAutoSizeType.AllRowsInBand); Infragistics.Win.UltraWinGrid.UltraGridLayout layout = e.Layout; Infragistics.Win.UltraWinGrid.UltraGridOverride ov = layout.Override; ov.AllowColSizing = Infragistics.Win.UltraWinGrid.AllowColSizing.Free; foreach (var band in layout.Bands) { foreach (var col in band.Columns) { col.PerformAutoResize(Infragistics.Win.UltraWinGrid.PerformAutoSizeType.AllRowsInBand); } }
I've included the file "longheader.png" to show what the problem is. Then when you doubleclick on the seperator on the right side of the header it actually snaps back to the size that i want, which you can see at "shortheader.png".
See, i've set AllowColSizing to Free. Doesn't work. I've set Runtime Label Sizing in the Rowlayout to None. Doesn't work. Can it be done? and how?
Thank you in advance for answering.
Hello Danny,
This issue has been resolved in the latest Service Release as of the date of this post. This service release is now available under your account at the Infragistics Website. To download the service release, log in to ‘Account’ and select ‘Keys & Downloads’. Select the appropriate tab for this product; then the license key. The available service releases (Hot Fixes) should now be listed on the page.
I have created CAS-126635-K4Y2Y3 to track this issue. I have logged the behavior with our developers. You can find more information in the support case.
You are welcome. ;)
DannyvdK said:I think what would suit the needs is a way to tell PerformAutoresize function to take into account the Label Position. When it's Left, you should have the option to tell the function not to size the labels with the content of the cell, but rather with the texts inside the label itself.
Interesting. I was thinking of doing it another way, but this makes more sense. :)
Mike,
Yeah that works. Luckily you normally know the width of a label, because you know the piece of text it needs to contain. So in that respect you guys can get away with it just fine in my personal opinion. ;)
I think what would suit the needs is a way to tell PerformAutoresize function to take into account the Label Position. When it's Left, you should have the option to tell the function not to size the labels with the content of the cell, but rather with the texts inside the label itself.
Let's see if I can get my employer to upgrade to version 13 *sigh*.