M
ME
The following code only "binds" when the toolStripComboBox1 is at the top of
the toolStrip1 hierarchy (i.e., ToolStrip > ToolStripSplitButton >
ToolStripComboBox). Why will the control NOT bind when it moved (recreated)
as a child control of a toolStrip control (i.e., ToolStrip >
ToolStripSplitButton > ToolStripComboBox)? I have also tried casting
toolStripComboBox1.Control as a standard ComboBox and binding it that way.
That method produces the same effect. I can use the exact same binding
settings on a regular ComboBox with no problems either. The problem truly
seems associated with the fact that the control being bound seems to be
nested.
//(bsCustomers is a BindingSource object and dvCustomers is a DataView
object)
bsCustomers.DataSource = dvCustomers;
toolStripComboBox1.ComboBox.DisplayMember = consts.Columns.colCustomersName;
//"Name"
toolStripComboBox1.ComboBox.ValueMember = consts.Columns.colCustomersID;
//"ID"
toolStripComboBox1.ComboBox.DataSource = bsCustomers;
------------------------------------------------------------------- Versions
Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727
Installed Edition: Professional
Microsoft Visual Basic 2005 77626-009-0000007-41501
Microsoft Visual Basic 2005
Microsoft Visual C# 2005 77626-009-0000007-41501
Microsoft Visual C# 2005
Microsoft Visual C++ 2005 77626-009-0000007-41501
Microsoft Visual C++ 2005
Microsoft Visual J# 2005 77626-009-0000007-41501
Microsoft Visual J# 2005
Microsoft Visual Web Developer 2005 77626-009-0000007-41501
Microsoft Visual Web Developer 2005
Crystal Reports AAC60-G0CSA4B-V7000AY
Crystal Reports for Visual Studio 2005
the toolStrip1 hierarchy (i.e., ToolStrip > ToolStripSplitButton >
ToolStripComboBox). Why will the control NOT bind when it moved (recreated)
as a child control of a toolStrip control (i.e., ToolStrip >
ToolStripSplitButton > ToolStripComboBox)? I have also tried casting
toolStripComboBox1.Control as a standard ComboBox and binding it that way.
That method produces the same effect. I can use the exact same binding
settings on a regular ComboBox with no problems either. The problem truly
seems associated with the fact that the control being bound seems to be
nested.
//(bsCustomers is a BindingSource object and dvCustomers is a DataView
object)
bsCustomers.DataSource = dvCustomers;
toolStripComboBox1.ComboBox.DisplayMember = consts.Columns.colCustomersName;
//"Name"
toolStripComboBox1.ComboBox.ValueMember = consts.Columns.colCustomersID;
//"ID"
toolStripComboBox1.ComboBox.DataSource = bsCustomers;
------------------------------------------------------------------- Versions
Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727
Installed Edition: Professional
Microsoft Visual Basic 2005 77626-009-0000007-41501
Microsoft Visual Basic 2005
Microsoft Visual C# 2005 77626-009-0000007-41501
Microsoft Visual C# 2005
Microsoft Visual C++ 2005 77626-009-0000007-41501
Microsoft Visual C++ 2005
Microsoft Visual J# 2005 77626-009-0000007-41501
Microsoft Visual J# 2005
Microsoft Visual Web Developer 2005 77626-009-0000007-41501
Microsoft Visual Web Developer 2005
Crystal Reports AAC60-G0CSA4B-V7000AY
Crystal Reports for Visual Studio 2005