I don't know what's causing this and I can't find anywhere where there's code trying to remove this control.
(1) System.ArgumentException: The ExpandableGroupBoxControlContainer cannot be removed from the UltraExpandableGroupBox's Controls collection.
- Message -------------------------------------------- The ExpandableGroupBoxControlContainer cannot be removed from the UltraExpandableGroupBox's Controls collection.
- Stack Trace ---------------------------------------- at Infragistics.Win.Misc.ExpandableGroupBoxControlCollection.Remove(Control ctrl) at System.Windows.Forms.Control.ControlCollection.Add(Control value)
<my code file>.InitializeComponent()
The line throwing this error appears to be this one:
this.expandableGroupBoxOptions.Controls.Add(this.expandableGroupBoxPanelFilter);
That error message doesn't make a lot of sense. I don't see why it says you can't REMOVE a control when you are trying to ADD a control. But in any case, you can't add controls directly to the UltraExpandableGroupBox, you have to add them to the Panel.
this.expandableGroupBoxOptions.Panel.Controls.Add(this.expandableGroupBoxPanelFilter);
Well... the only way I can imagine a call to the ControlCollection.Add causing that error is if expandableGroupBoxPanelFilter is the Panel control for an UltraExpandableGroupBox and that by adding it to one control, you are essentially trying to remove that control from the UltraExpandableGroupBox and parent it to some other control.
What is expandableGroupBoxPanelFilter?
I tried that, same error.
at Infragistics.Win.Misc.ExpandableGroupBoxControlCollection.Remove(Control ctrl)
at System.Windows.Forms.Control.ControlCollection.Add(Control value)