Page 1 of 1

How to bind ComboBox on Form to Data?

Posted: Tue Jul 04, 2006 8:26 am
by GarryGlobe
Hi!
Please help me to solve my trouble. I have a custom dialog form with some comboboxes on it. How can I fill my comboboxes from the dataset?
Thank you for help.

How to bind ComboBox on Form to Data?

Posted: Tue Jul 04, 2006 8:36 am
by Edward
GarryGlobe wrote:Hi!
Please help me to solve my trouble. I have a custom dialog form with some comboboxes on it. How can I fill my comboboxes from the dataset?
Thank you for help.
Hello!
Here 3 solutions for you.
1. You may specify the DataBindings property.

2. You may get native ComboBox by this code:

Code: Select all

ComboBox comboBox = ReportComboBox.Control;
3. You may fill combobox in the FormLoad events:

Code: Select all

ReportComboBox.Items.Add("123");
Thank you!