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.
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.
8306.TestSample.zip
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.
I just checked out your app and everything works just fine.
I read your response twice and when you said that you let your application sit for two days and thenYou are able to reproduce the issue , this makes me think if you are using remote desktop connection , so you run the application, close the connection and after two days open connection again that made you reproduce the issue? So there is no reliably way to reproduce the issue ? After 2 days sounds like you are having memory leak , you can check in the task manager may be ,check what is eating up the memory?
Also you mentioned that you are only able to reproduce the issue with Win11? Did you try my application on Win11 and were you able to reproduce the issue? Did you try your application on other machine using Win 11? Trying to understand if the issue is environment specific.
You can bind the grid with any dummy data (since the issue is not about the data) issue is about how you are changing the font or I would say through which event you are changing the font.
If you can provide the sample I can run against different OS and dlls .But for now I need more information . Also would like to know if your application is multithread application?Because we don’t support that.
Ok, it took me a while cause there are a lot of moving parts and separating it wasn't easy, but I finally got everything but the grid removed.
Here's the problem though... when i launched it for the first time, the grid looked just fine in the new app. So I started the original app and it looked good too. So I closed them both down and let them sit a couple days, and when I started them both up again they both had the issue again. Then I waited a few more days and they were just fine again.
I really think there might be something with the dlls and win11. Now, before you ask... it's a new box, only a couple mos old, and a new installation of VS2022. I still have my old win10 box though and it still works just fine every time.
So where can we go from here?
Hello,
Sample should be self contained ,than only i can provide it to developer to fix the issue (if any).
Once you bind the grid it would not be that big , just delete the dlls from the sample and sample should be easily attach here .
If not ,try to email it at support@infragistics.com
No it's not fixed; it was only your sample that worked.
Do you have the ability to attach a SQL DB? Or does the sample have to be self-contained... Also, the app is larger than I can post here. Do you have an ftp?
Do you mean you resolved your issue or just my sample worked fine?
If my sample worked fine at your end that means its not related to windows 11, and any style ,
there is something in your code causing this.
Yes you have to try isolating the code or detach the sample from the DB and bind with the dummy data and see if this help reproducing the issue.