Hi all,
I have a problem with wingrid (version 9.1 Hotfix 1). In my application I can dynamically hide and visualize columns. I'm not using the column chooser, but a self programmed form. When I hide a column and then visualize it again, all new visualized columns are sized to a minimum width (it seems). This behavior wasn't in 8.3!
Regards
Hi,
I am facing similiar problems but only if the grid is on an ultrapanel. is the the grid on WinForm Panel or ultrapanel.
regards
Stefan
Hi Mike,
instead of making a small project, I made a test using a version (from my subversion repository) before I made the to 9.3 upgrade. In this version (that uses 8,3) the resizing problem doesn't exists. So I couldn't believe, that the behavior is the same for 8.3 and 9.1 ...
I have set AutoFitStyle to None
grid.DisplayLayout.AutoFitStyle = AutoFitStyle.None;
The only thing what I have done is to update the version, from 8.3 to 9.1 (with hotfix), to solve the PDF Export problem. This works know, but now, my grid goes crazy?! I need to fix this problem.
The following line of codes are my settings for the grid
grid.UseFlatMode = DefaultableBoolean.True;grid.DisplayLayout.BorderStyle = UIElementBorderStyle.Solid;grid.DisplayLayout.AutoFitStyle = AutoFitStyle.None;grid.DisplayLayout.ColumnChooserEnabled = DefaultableBoolean.False;grid.DisplayLayout.CaptionVisible = DefaultableBoolean.False;grid.DisplayLayout.CellHottrackInvalidationStyle = CellHottrackInvalidationStyle.Never;grid.DisplayLayout.ViewStyle = Infragistics.Win.UltraWinGrid.ViewStyle.SingleBand;grid.DisplayLayout.ViewStyleBand = ViewStyleBand.Horizontal;grid.DisplayLayout.FilterDropDownButtonImage = Properties.Resources.png16_Filter_Disabled;grid.DisplayLayout.FilterDropDownButtonImageActive = Properties.Resources.png16_Filter;grid.DisplayLayout.SummaryButtonImage = Properties.Resources.png16_Empty;grid.DisplayLayout.UseFixedHeaders = true;grid.DisplayLayout.Override.ActiveRowAppearance.ForeColor = ColorTable.GRID_ACTIVE_FORECOLOR;grid.DisplayLayout.Override.ActiveRowAppearance.BackColor = ColorTable.GRID_ACTIVE_BACKCOLOR;grid.DisplayLayout.Override.AllowAddNew = AllowAddNew.No;grid.DisplayLayout.Override.AllowColMoving = AllowColMoving.WithinGroup;grid.DisplayLayout.Override.AllowColSwapping = AllowColSwapping.NotAllowed;grid.DisplayLayout.Override.AllowDelete = DefaultableBoolean.False;grid.DisplayLayout.Override.AllowGroupBy = DefaultableBoolean.False;grid.DisplayLayout.Override.AllowGroupMoving = AllowGroupMoving.WithinBand;grid.DisplayLayout.Override.AllowGroupSwapping = AllowGroupSwapping.NotAllowed;grid.DisplayLayout.Override.AllowMultiCellOperations = AllowMultiCellOperation.None;grid.DisplayLayout.Override.AllowRowFiltering = DefaultableBoolean.True;grid.DisplayLayout.Override.AllowRowSummaries = AllowRowSummaries.True;grid.DisplayLayout.Override.AllowUpdate = DefaultableBoolean.False;grid.DisplayLayout.Override.BorderStyleCell = UIElementBorderStyle.Solid;grid.DisplayLayout.Override.BorderStyleHeader = UIElementBorderStyle.Solid;grid.DisplayLayout.Override.BorderStyleRow = UIElementBorderStyle.Solid;grid.DisplayLayout.Override.BorderStyleRowSelector = UIElementBorderStyle.Solid;grid.DisplayLayout.Override.BorderStyleSummaryFooter = Infragistics.Win.UIElementBorderStyle.None;grid.DisplayLayout.Override.BorderStyleSummaryFooterCaption = Infragistics.Win.UIElementBorderStyle.None;grid.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.RowSelect; grid.DisplayLayout.Override.CellAppearance.BackColor = ColorTable.GRID_CELL_BACKCOLOR;grid.DisplayLayout.Override.CellAppearance.BorderColor = ColorTable.GRID_CELL_BORDERCOLOR;grid.DisplayLayout.Override.DefaultRowHeight = 18;grid.DisplayLayout.Override.HeaderAppearance.BackColor = ColorTable.GRID_HEADER_BACKCOLOR;grid.DisplayLayout.Override.HeaderAppearance.BorderColor = ColorTable.GRID_CELL_BORDERCOLOR;grid.DisplayLayout.Override.HeaderAppearance.FontData.Name = SystemHelper.IsVistaOS() == true ? "Segoe" : "Tahoma";grid.DisplayLayout.Override.HeaderAppearance.FontData.Bold = DefaultableBoolean.True;grid.DisplayLayout.Override.HeaderAppearance.TextHAlign = HAlign.Left;grid.DisplayLayout.Override.HeaderStyle = HeaderStyle.Standard;grid.DisplayLayout.Override.RowAppearance.BorderColor = ColorTable.GRID_ROW_BORDERCOLOR;grid.DisplayLayout.Override.RowSizing = RowSizing.Fixed;grid.DisplayLayout.Override.RowSelectorHeaderStyle = RowSelectorHeaderStyle.SeparateElement;grid.DisplayLayout.Override.RowSelectors = DefaultableBoolean.True;grid.DisplayLayout.Override.RowSelectorHeaderAppearance.BackColor = ColorTable.GRID_HEADER_BACKCOLOR;grid.DisplayLayout.Override.RowSelectorHeaderAppearance.ImageBackground = Properties.Resources.png16_ColumnChooser;grid.DisplayLayout.Override.RowSelectorHeaderAppearance.ImageHAlign = HAlign.Center;grid.DisplayLayout.Override.RowSelectorHeaderAppearance.ImageVAlign = VAlign.Middle;grid.DisplayLayout.Override.RowSelectorAppearance.BackColor = ColorTable.GRID_HEADER_BACKCOLOR;grid.DisplayLayout.Override.RowSelectorAppearance.BorderColor = ColorTable.GRID_CELL_BORDERCOLOR;grid.DisplayLayout.Override.SelectedRowAppearance.ForeColor = ColorTable.GRID_ACTIVE_FORECOLOR;grid.DisplayLayout.Override.SelectedRowAppearance.BackColor = ColorTable.GRID_CELL_BACKCOLOR;grid.DisplayLayout.Override.SpecialRowSeparator = SpecialRowSeparator.SummaryRow;grid.DisplayLayout.Override.SpecialRowSeparatorHeight = 5;grid.DisplayLayout.Override.SpecialRowSeparatorAppearance.BorderColor = ColorTable.GRID_CELL_BORDERCOLOR;grid.DisplayLayout.Override.SpecialRowSeparatorAppearance.BackColor = ColorTable.GRID_HEADER_BACKCOLOR;grid.DisplayLayout.Override.SummaryFooterSpacingBefore = 5;grid.DisplayLayout.Override.SummaryFooterCaptionVisible = Infragistics.Win.DefaultableBoolean.False;grid.DisplayLayout.Override.SummaryValueAppearance.BackColor = ColorTable.GRID_HEADER_BACKCOLOR;grid.DisplayLayout.Override.SummaryValueAppearance.BorderColor = ColorTable.GRID_CELL_BORDERCOLOR;grid.DisplayLayout.Override.TipStyleHeader = TipStyle.Show;grid.DisplayLayout.Override.TipStyleCell = TipStyle.Show;grid.DisplayLayout.Override.SelectTypeCell = Infragistics.Win.UltraWinGrid.SelectType.None;grid.DisplayLayout.Override.SelectTypeCol = Infragistics.Win.UltraWinGrid.SelectType.None;grid.DisplayLayout.Override.SelectTypeRow = Infragistics.Win.UltraWinGrid.SelectType.None;
Hiding a column should not affect the size of any other column, unless maybe you are using the AutoFitStyle. I fyou are using AutoFitStyle, then hiding a column will cause the other columns to expand to fill the extra space and thus every column will get bigger. When you re-show the hidden column, it will now be proportionally smaller than the other columns (since they all got bigger).
But this behavior is the same in every version. If you are seeing some difference in behavior between v8.3 and v9.1, then it sounds like something is wrong. Can you duplicate the behavior in a small sample project?
Hi Amiram,
thx for your response. I see that it wasn't a good idea to install Version 2009.1, I thought to get a fix for some problems but I got more problems.