This worked just fine before I upgraded.
My rows don't grow with the fontsize. I've tried all the rowsize options like this:
grid.DisplayLayout.Override.RowSizing = RowSizing.AutoFree;
Here's what I get no matter what.
I just checked out your app and everything works just fine.
Thanks, I'll go through your code, but I don't expect anything to come of it.
Also, it may or may not be relevant, but the other diff is that now I'm running it on Win11.
I'll see if i can divorce the app from the DB, or maybe include just the tables needed to repro.
I'm on 22.1.
Hello Sean,
Thank you for sharing the code. I used your style class into my sample and I am not able to reproduce the issue, I tried setting different values for Appearance.FontData.SizeInPoints and grid is growing fine as per the value. Please note for some backcolor and forecolor I set the color of my own because I don’t know which color did you set in your sample, although colors are not related to the issue here.
In my sample I am binding the grid with dummy data , because data is also not relevant here.
I build the sample against V20.2.14. may I know which exact version you are using, I can test the sample against that version if that may matter.
I attached my sample here for your reference. You may modify my sample ,help reproducing the issue or bind your grid with dummy data ,isolate the properties until you find which property is indeed causing the issue and share that information with me to test it and further investigate it.
Let me know of you have any question.
Regards,
8306.TestSample.zip
I believe I brought it up from 2020.
I'm controlling all my styles through a style class. Here's the method that does grid styles.
public void GridStyles(UltraGrid grid) { SetGlobals(); ////////BEGIN Grid-level/////////// //ColumnsCollection columns = grid.DisplayLayout.Bands[0].Columns; //foreach (UltraGridColumn c in columns) //{ // c.Nullable = Nullable.Nothing; //} grid.UseOsThemes = DefaultableBoolean.False; grid.UseAppStyling = false; grid.DisplayLayout.Appearance.FontData.SizeInPoints = 8;//gridFontSize; grid.DisplayLayout.Appearance.BackColor = colorBase; grid.Layouts.Grid.DisplayLayout.ColumnChooserEnabled = DefaultableBoolean.True; grid.DisplayLayout.AutoFitStyle = AutoFitStyle.None; ////////END Grid-level///////////// ////////BEGIN Rows/////////// grid.DisplayLayout.Bands[0].Override.RowAppearance.BackColor = gridRowColor; grid.DisplayLayout.Bands[0].Override.RowAlternateAppearance.BackColor = gridRowAlternateColor; grid.DisplayLayout.Bands[0].Override.RowAlternateAppearance.ForeColor = fontColorBase; grid.DisplayLayout.Bands[0].Override.RowAppearance.ForeColor = fontColorBase; //grid.DisplayLayout.Bands[0].Override.RowSelectorAppearance.Image = gridColChooserImage; //grid.DisplayLayout.Bands[0].Override.AddRowAppearance.Image = gridAddRowImage; grid.DisplayLayout.RowSelectorImages.AddNewRowImage = Image.FromFile("./Images/MinionAddGridRow.ico"); grid.DisplayLayout.RowSelectorImages.ActiveAndAddNewRowImage = Image.FromFile("./Images/EditRow.png"); //grid.DisplayLayout.Appearance.o.Image = gridColChooserImage; ////////END Rows/////////// //Look of AddRow when it's not active in the grid. //this.gridLocations.DisplayLayout.Override.TemplateAddRowCellAppearance.BackColor = Color.Yellow; //this.gridLocations.DisplayLayout.Override.TemplateAddRowCellAppearance.ForeColor = Color.LightYellow; //Look of AddRow when it's active in the grid. grid.DisplayLayout.Override.AddRowCellAppearance.BackColor = Color.LightYellow; grid.DisplayLayout.Override.AddRowCellAppearance.ForeColor = Color.Red; grid.DisplayLayout.GroupByBox.Appearance.BackColor = colorBase; ////////BEGIN Group By Box/////////// //if ((int) grid.DisplayLayout.Grid.Rows.SummaryValues[0].Value == 1) //{ // grid.DisplayLayout.Grid.Rows.SummaryValues[0].Appearance.BackColor = Color.Blue; //} grid.DisplayLayout.Override.RowSizing = RowSizing.AutoFree; grid.DisplayLayout.GroupByBox.Appearance.BackGradientStyle = GradientStyle.None; ////////END Group By Box///////////// grid.DisplayLayout.Override.RowSelectorHeaderStyle = Infragistics.Win.UltraWinGrid.RowSelectorHeaderStyle.ColumnChooserButton; ////////BEGIN Header/////////// grid.DisplayLayout.Override.HeaderAppearance.BackColor = gridHeaderColor; grid.DisplayLayout.Override.HeaderAppearance.ForeColor = fontColorBase; grid.DisplayLayout.Override.HeaderAppearance.BackGradientStyle = GradientStyle.None; grid.DisplayLayout.Override.ColumnAutoSizeMode = ColumnAutoSizeMode.AllRowsInBand; ////////END Header///////////// ////////BEGIN Fixed Header/////////// grid.DisplayLayout.Override.FixedHeaderAppearance.BackColor = gridFixedHeaderColor; grid.DisplayLayout.Override.FixedHeaderAppearance.ForeColor = gridFixedHeaderFontColor; ////////END Fixed Header///////////// UltraGridLayout layout = grid.DisplayLayout; UltraGridBand band = layout.Bands[0]; if (band.Columns.Exists("ServerName")) { UltraGridColumn column = band.Columns["ServerName"]; column.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Button; grid.DisplayLayout.Override.CellButtonAppearance.ImageHAlign = HAlign.Center; grid.DisplayLayout.Override.ButtonStyle = UIElementButtonStyle.Borderless; grid.DisplayLayout.UseFixedHeaders = true; grid.DisplayLayout.Bands[0].Columns["ServerName"].Header.Fixed = true; grid.DisplayLayout.Override.FixedCellSeparatorColor = gridFixedCellSeparator; column.Header.Appearance.Image = Image.FromFile("./Images/SingleEyecon.png"); } if (band.Columns.Exists("DriveName")) { UltraGridColumn column = band.Columns["DriveName"]; column.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Button; grid.DisplayLayout.Override.CellButtonAppearance.ImageHAlign = HAlign.Center; grid.DisplayLayout.Override.ButtonStyle = UIElementButtonStyle.Borderless; grid.DisplayLayout.UseFixedHeaders = true; grid.DisplayLayout.Bands[0].Columns["DriveName"].Header.Fixed = true; grid.DisplayLayout.Override.FixedCellSeparatorColor = gridFixedCellSeparator; column.Header.Appearance.Image = Image.FromFile("./Images/SingleEyecon.png"); } //grid.DisplayLayout.PerformAutoResizeColumns(true, PerformAutoSizeType.AllRowsInBand, // AutoResizeColumnWidthOptions.All); ////////BEGIN Filter Row/////////// grid.DisplayLayout.Bands[0].Override.RowFilterMode = RowFilterMode.AllRowsInBand; grid.DisplayLayout.Bands[0].Override.FilterRowAppearance.Image = Image.FromFile("./Images/Find.png"); grid.DisplayLayout.Bands[0].Override.FilterRowAppearance.BackColor = gridFilterRowColor; grid.DisplayLayout.Bands[0].Override.RowSelectors = DefaultableBoolean.True; //grid.DisplayLayout.Bands[0].Override.RowSelectorAppearance ////////END Filter Row///////////// ////////BEGIN Error Row/////////// grid.DisplayLayout.Bands[0].Override.DataErrorRowAppearance.BackGradientStyle = GradientStyle.GlassBottom20; grid.DisplayLayout.Bands[0].Override.DataErrorRowAppearance.BackColor = gridDataErrorGradient1; grid.DisplayLayout.Bands[0].Override.DataErrorRowAppearance.BackColor2 = gridDataErrorGradient2; grid.DisplayLayout.Bands[0].Override.DataErrorRowAppearance.Image = gridDataErrorImage; ////////END Error Row///////////// }
I'm not setting row size anywhere. Separating the grid from the app to package up for you would be quite difficult as the whole thing is highly dependent on the DB.
May I know from which version you upgraded to V22.1?
So if rows are not growing as per the font size may I know how you changing the font?
You might have row hight set somewhere in the code, can you please check?
I created a simple demo sample to test this and not able to reproduce the issue,
please share your sample reproducing the issue for further investigation?