Groups | Blog | Home
all groups > dotnet windows forms > january 2006 >

dotnet windows forms : ComboBox design-time DataBinding setting questions.


dbuchanan
1/31/2006 3:15:25 PM
These setting mystify me for these reasons.

*SelectedItem* - Help says that 'SelectedItem' gets or sets the
currently selected item in the combobox.

*SelectedValue* - Help says that 'SelectedValue' gets or sets the value
of the member property specified by the ValueMember property.

*ValueMember* - Help says that the 'ValueMember' Gets or sets the
property to use as the actual value for the items in the ListControl.

The above three properties are described as results of runtime events!
What are they doing in the properties section of the ComboBox?????

How do I use them to sync a databound combobox on a form with the
current bound row on the form?

Please help me understand how to use these settings?

Thank you,
dbuchanan
Cor Ligthert [MVP]
2/1/2006 12:00:00 AM
Hi,

The combobox is a control (as any listcontrol as the listbox by the way)
which can be used in more ways. One of those is that it can be used with an
array as a simple control and it can be used as a complex data bound
control. However that is not intermixed it is just one of those ways. Which
means as well that they can work completely different by instance with
events.

In the simple format you have the SelectedItem in the complex dataformat you
use by instance the SelectedValue (for the valuemember) or the SelectedText
for the displaymember.

I hope this helps a little bit,

cor

AddThis Social Bookmark Button