I am using the example in Knowledge Base Article: KB01026 (http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=1026) to display data. This example displays the column headers for the childrows at the top of the band. I am more interested in having the column headers for the chidrows to be displayed just above the first chidrow in each 'GroupedBy' item as in the Knowledge Base Article: KB05594 (http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=5594).
I tried to insert a picture without success. Can someone tell me the correct syntax for the 'Image URL' in the dialog for inserting a picture?
Hi,
I think what you are looking for the HeaderPlacement property on the Override.
If you want to post a picture, the easiest thing to do is go to the Options tab while posting and attach your image file. It will show up in the post as an image if the file type is an image file.
Hi Mike,
I had already tried the HeaderPlacement property. Does this require multiple bands to work correctly? I am using a single band and want to make it look like 'OncePerRowIsland' in the example in http://help.infragistics.com/Help/NetAdvantage/WinForms/2012.2/CLR4.0/html/WinGrid_Control_the_Placement_of_Headers.html
I tried this out and it seems to be working fine for me.All I did was this:
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { UltraGridLayout layout = e.Layout; UltraGridBand band = layout.Bands[0]; UltraGridOverride ov = layout.Override; layout.ViewStyleBand = ViewStyleBand.OutlookGroupBy; band.SortedColumns.Add("Int32 1", false, true); ov.HeaderPlacement = HeaderPlacement.OncePerRowIsland; }
When I do this, I get headers at the top of each set of child rows under each group. Is that not what you want?
Mike,
I tried exactly what you did, but it didn't work. I am wondering if something is working against this. My grid is an inherited grid. I am setting various properties in the New sub.
Public Sub New() MyBase.New()
' This call is required by the Windows Form Designer. InitializeComponent()
' Add any custom default settings With Me.DisplayLayout.Override .CellPadding = 0 .RowAppearance.BorderColor = Color.LightGray .CellAppearance.BorderColor = Color.LightGray .BorderStyleRow = UIElementBorderStyle.Dotted .BorderStyleCell = UIElementBorderStyle.Dotted .CellMultiLine = Infragistics.Win.DefaultableBoolean.True .ColumnAutoSizeMode = UltraWinGrid.ColumnAutoSizeMode.AllRowsInBand .HeaderStyle = HeaderStyle.WindowsVista .RowSelectors = Infragistics.Win.DefaultableBoolean.False .ColumnSizingArea = ColumnSizingArea.HeadersOnly .FixedCellSeparatorColor = _ Color.FromArgb(CType(CType(85, Byte), Integer), CType(CType(127, Byte), _ Integer), CType(CType(170, Byte), Integer)) .RowAlternateAppearance.BackColor = _ Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), _ Integer), CType(CType(224, Byte), Integer)) .SelectTypeCell = Infragistics.Win.UltraWinGrid.SelectType.Extended .AllowMultiCellOperations = AllowMultiCellOperation.Copy .RowSizing = Infragistics.Win.UltraWinGrid.RowSizing.AutoFree .AllowUpdate = Infragistics.Win.DefaultableBoolean.True .AllowAddNew = Infragistics.Win.UltraWinGrid.AllowAddNew.No .CellClickAction = UltraWinGrid.CellClickAction.RowSelect .AllowRowSummaries = AllowRowSummaries.Default .EditCellAppearance.BackColor = Color.White .EditCellAppearance.ForeColor = Color.Black End With With Me.DisplayLayout .ViewStyle = UltraWinGrid.ViewStyle.SingleBand .EmptyRowSettings.Style = EmptyRowStyle.PrefixWithEmptyCell .ScrollBounds = UltraWinGrid.ScrollBounds.ScrollToFill .ScrollStyle = ScrollStyle.Immediate .PriorityScrolling = True .ScrollBarLook.ScrollBarArrowStyle = _ Infragistics.Win.UltraWinScrollBar.ScrollBarArrowStyle.Default .AutoFitStyle = AutoFitStyle.ExtendLastColumn .GroupByBox.Hidden = True .AddNewBox.Hidden = False .TabNavigation = Infragistics.Win.UltraWinGrid.TabNavigation.NextCell End With
End Sub
I'm a little confused. This code shows you setting the ViewStyle to SingleBand. So you cannot possibly be using OutlookGroupBy functionality. Unless something else is setting that property to OutlookGroupBy later on.
I also don't see anything here that sets the HeaderPlacement property.
Maybe you are loading a Layout into the grid at some point after this code and it's overriding the settings you are applying here.
Thanks Mike. Setting the ViewStyle property to MultiBand fixed it!