Profile Picture

NCombobox databinding

Posted By S. Mann 14 Years Ago
Author
Message
S. Mann
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 1, Visits: 1
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.

Angel Chorbadzhiev
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)

Group: Forum Members
Last Active: Last Month
Posts: 139, Visits: 184

Hello S.Mann,

Currently NComboBox and NListBox doesn't support databinding.

You have to add or remove the items manually.

Regards,

Angel.





Similar Topics


Reading This Topic