Populating ToolStripCombobox with BO...


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Toolstrips basically have a wrapper for combo boxes.  In fact, they inherit from a System.Windows.Forms.Combobox class.  To populate a toolstrip combo using data you will have to manually set the data source property as well as the ValueMember and DisplayMemeber.  To access the wrapped combo box it will look something like this.

        Me.ToolStripComboBox1.ComboBox.DataSource = MyBO.CurrentDataTable
        Me.ToolStripComboBox1.ComboBox.ValueMember = "ValueFieldName"
        Me.ToolStripComboBox1.ComboBox.DisplayMember = "DisplayFieldName"

Use this code whenever you need to populate the toolstrip combo box.

StarkMike
StarkMike
Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)
Group: Forum Members
Posts: 436, Visits: 944
How do I populate a toolstripcombobox with a BO?



I also noticed that the only toolstrip you have is the maintenance form one. Is there any way to get your combo box on the toolstrip? Do you have your own version of the toolstrip?



Mike
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search