I am having an issue with Ulta Combos that are bound to a binding source that uses a Data Member.
When I set the data source of the Ultra Combo to be the Binding Source that I want, Visual Studio (2005) hangs and sometimes takes up to 5 minutes before focus returns.
Upon investigation, it seems that thousands of lines of needless code has automatically been generated in the frmxxx.Designer.vb file. This generated code is all related to the 'banding' property of the ultra combo and is causing me massive problems. With an Ultra Grid there are ways of turning this annoying habit off, but there appears to be no such option in the Ultra Combo designer properties.
Has anyone else experienced this problem and if so how can I get around it?
Thanks,
Mike Farley
Oh, I see. The issue is the child bands getting created. Yes, I tend to agree with you there. I am pretty sure that SingleBand is the default for UltraCombo. But MaxBandDepth probably defaults to 100. That should probably be corrected. You should Submit an incident to Infragistics Developer Support and just include a link to this forum post so they can see this discussion.
I fixed this by going through the ultracombo designer Control Settings. I had to set DisplayLayout - MaxBandDepth = 1 and ViewStyle = SingleBand. I had to do exactly the same to prevent this problem from occurring when using the ultragrid, however the settings were easier to locate for the ultragrid.
I really would have expected this to be the default setting, especially considering how hard it was to locate given that there are so many settings that can be changed. Before I had changed these settings it was playing absolute havoc with my solution, literally hanging visual studio for minutes at a time and even crashing it on occasion.
I'm still a little unclear on the issue.Which of these lines of code do you feel is "unneccessary" and why?
One thing I do see is that the AutoCompletelMode is being set on every column. That's a known bug, I think, and it should be corrected in the next hot fix.
But I don't see any other code here that is unneccessary. Although I grant you I didn't read every line of it thoroughly.
I believe he's talking about stuff like the code extract below This is for a combo bound to an entity which amongst other properties has three properties that are themselves entities. One of these entities also has a property that is an entity. I happen to know that Michael's project uses a linq to sql domain model with all foreign key relationships intact, so the object he's binding to probably pulls in the entire domain model as nested properties. Whilst I'd probably opt for a slightly more intelligent domain model myself, or use DTOs, what he's saying is certainly true. Here's the code that was generated in the example I outlined
Appearance21.BackColor = System.Drawing.SystemColors.Window
Appearance21.BorderColor = System.Drawing.SystemColors.InactiveCaption
UltraGridColumn1.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn1.Header.VisiblePosition = 0
UltraGridColumn1.Hidden = True
UltraGridColumn2.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn2.Header.VisiblePosition = 1
UltraGridColumn3.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn3.Header.VisiblePosition = 2
UltraGridColumn3.Hidden = True
UltraGridColumn4.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn4.Header.VisiblePosition = 3
UltraGridColumn5.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn5.Header.VisiblePosition = 4
UltraGridColumn5.Hidden = True
UltraGridColumn6.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn6.Header.VisiblePosition = 5
UltraGridColumn6.Hidden = True
UltraGridColumn7.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn7.Header.VisiblePosition = 6
UltraGridColumn7.Hidden = True
UltraGridColumn8.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn8.Header.VisiblePosition = 7
UltraGridColumn8.Hidden = True
UltraGridColumn9.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn9.Header.VisiblePosition = 8
UltraGridColumn9.Hidden = True
UltraGridColumn10.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn10.Header.VisiblePosition = 9
UltraGridColumn10.Hidden = True
UltraGridColumn11.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn11.Header.VisiblePosition = 10
UltraGridColumn11.Hidden = True
UltraGridColumn12.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn12.Header.VisiblePosition = 11
UltraGridColumn12.Hidden = True
UltraGridColumn13.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn13.Header.VisiblePosition = 12
UltraGridColumn13.Hidden = True
UltraGridColumn14.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn14.Header.VisiblePosition = 13
UltraGridColumn15.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn15.Header.VisiblePosition = 14
UltraGridColumn16.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn16.Header.VisiblePosition = 15
UltraGridColumn17.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn17.Header.VisiblePosition = 16
UltraGridColumn17.Hidden = True
UltraGridColumn18.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn18.Header.VisiblePosition = 0
UltraGridColumn19.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn19.Header.VisiblePosition = 1
UltraGridColumn20.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn20.Header.VisiblePosition = 2
UltraGridColumn21.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn21.Header.VisiblePosition = 3
UltraGridColumn22.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn22.Header.VisiblePosition = 4
UltraGridColumn23.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn23.Header.VisiblePosition = 5
UltraGridColumn24.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn24.Header.VisiblePosition = 6
UltraGridColumn25.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn25.Header.VisiblePosition = 7
UltraGridColumn26.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn26.Header.VisiblePosition = 8
UltraGridColumn27.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn27.Header.VisiblePosition = 9
UltraGridColumn28.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn28.Header.VisiblePosition = 0
UltraGridColumn29.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn29.Header.VisiblePosition = 1
UltraGridColumn30.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn30.Header.VisiblePosition = 2
UltraGridColumn31.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn31.Header.VisiblePosition = 3
UltraGridColumn32.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn32.Header.VisiblePosition = 4
UltraGridColumn33.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn33.Header.VisiblePosition = 5
UltraGridColumn34.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn34.Header.VisiblePosition = 0
UltraGridColumn35.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn35.Header.VisiblePosition = 1
UltraGridColumn36.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn36.Header.VisiblePosition = 2
UltraGridColumn37.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn37.Header.VisiblePosition = 3
UltraGridColumn38.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn38.Header.VisiblePosition = 4
UltraGridColumn39.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn39.Header.VisiblePosition = 5
UltraGridColumn40.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn40.Header.VisiblePosition = 0
UltraGridColumn41.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn41.Header.VisiblePosition = 1
UltraGridColumn42.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn42.Header.VisiblePosition = 2
UltraGridColumn43.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn43.Header.VisiblePosition = 3
UltraGridColumn44.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn44.Header.VisiblePosition = 4
UltraGridColumn45.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.None
UltraGridColumn45.Header.VisiblePosition = 5
Me.UltraCombo1.DisplayLayout.BandsSerializer.Add(UltraGridBand1)
Me.UltraCombo1.DisplayLayout.BandsSerializer.Add(UltraGridBand3)
Me.UltraCombo1.DisplayLayout.BandsSerializer.Add(UltraGridBand5)
Appearance22.BackColor = System.Drawing.SystemColors.ActiveBorder
Appearance22.BackColor2 = System.Drawing.SystemColors.ControlDark
Appearance22.BackGradientStyle = Infragistics.Win.GradientStyle.Vertical
Appearance22.BorderColor = System.Drawing.SystemColors.Window
Appearance23.ForeColor = System.Drawing.SystemColors.GrayText
Appearance24.BackColor = System.Drawing.SystemColors.ControlLightLight
Appearance24.BackColor2 = System.Drawing.SystemColors.Control
Appearance24.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal
Appearance24.ForeColor = System.Drawing.SystemColors.GrayText
Me.UltraCombo1.DisplayLayout.MaxColScrollRegions = 1
Appearance13.BackColor = System.Drawing.SystemColors.Window
Appearance13.ForeColor = System.Drawing.SystemColors.ControlText
Appearance14.BackColor = System.Drawing.SystemColors.Highlight
Appearance14.ForeColor = System.Drawing.SystemColors.HighlightText
Me.UltraCombo1.DisplayLayout.Override.BorderStyleCell = Infragistics.Win.UIElementBorderStyle.Dotted
Appearance15.BackColor = System.Drawing.SystemColors.Window
Appearance16.BorderColor = System.Drawing.Color.Silver
Appearance16.TextTrimming = Infragistics.Win.TextTrimming.EllipsisCharacter
Me.UltraCombo1.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.EditAndSelectText
Appearance17.BackColor = System.Drawing.SystemColors.Control
Appearance17.BackColor2 = System.Drawing.SystemColors.ControlDark
Appearance17.BackGradientAlignment = Infragistics.Win.GradientAlignment.Element
Appearance17.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal
Appearance17.BorderColor = System.Drawing.SystemColors.Window
Appearance18.TextHAlignAsString = "Left"
Me.UltraCombo1.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.SortMulti
Appearance19.BackColor = System.Drawing.SystemColors.Window
Appearance19.BorderColor = System.Drawing.Color.Silver
Appearance20.BackColor = System.Drawing.SystemColors.ControlLight
Me.UltraCombo1.DisplayLayout.Override.TemplateAddRowAppearance = Appearance20
Me.UltraCombo1.DisplayLayout.ScrollStyle = Infragistics.Win.UltraWinGrid.ScrollStyle.Immediate
Me.UltraCombo1.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.[Default]
Me.UltraCombo1.Location = New System.Drawing.Point(120, 137)
Me.UltraCombo1.Name = "UltraCombo1"
Me.UltraCombo1.TabIndex = 1
Me.UltraCombo1.Text = "UltraCombo1"
Could you be more specific? What exactly are these thousands of lines of unneccessary code that are being generated?