Nevron Forum

NCombobox databinding

https://www.nevron.com/Forum/Topic3208.aspx

By Sourena Mansouri - Monday, March 8, 2010

Hi All,

I'm having a newbie issue. With Microsoft combobox I can do a binding such as the following:

// Populate the list
comboBoxState.DataSource = DataSet;
// Define the field to be displayed
comboBoxState.DisplayMember = "States.StateName";
// Define the field to be used as the value
comboBoxState.ValueMember = "States.StateID";
// Bind the selected value of the the ComboBox to the
// Region field of the current Customer
comboBoxState.DataBindings.Add("SelectedValue", DataSet, "Customers.State");

However the DataSource, DisplayMember, ValueMember properties are not available in NComboBox as well as the SelectedValue binding. What alternative method do I have to do the binding that I need here, to look up and fill the text from one table and on selection write the ID to another table.

Than you all in advance.

Cheers.
By Angel Chorbadzhiev - Tuesday, March 9, 2010

Hello S.Mann,

Currently NComboBox and NListBox doesn't support databinding.

You have to add or remove the items manually.

Regards,

Angel.