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.
Hello Sean,
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?
Regards,
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.