I have bound a combo box to a DataTable:
cbo.DataSource = m_dtLangs
cbo.DisplayMember = [field_name]
cbo.DisplayValue = [field_name]

ComboBox.DropDownStyle = DropDownList

When the selected item changes, I want the combobox to update a different
datatable with the currently selected value. So I have tried the following:

cbo.DataBindings.Add("Text", m_dtLabel, "printer_lang")
cbo.DataBindings.Add("SelectedText", m_dtLabel, "printer_lang")
cbo.DataBindings.Add("SelectedValue", m_dtLabel, "printer_lang")
cbo.DataBindings.Add("SelectedItem", m_dtLabel, "printer_lang")

None of these work (text / selectedText doesn't work because its a
DropDownList). I just can't seem to find the property where the actual value
is stored...

Any suggestions?

Framework 1.0
VS.NET 2K2

TIA,
Jeremy

Data Binding & Controls by Rich

Rich
Wed Sep 03 11:01:24 CDT 2003

cbo.SelectedValue

>-----Original Message-----
>I have bound a combo box to a DataTable:
> cbo.DataSource = m_dtLangs
> cbo.DisplayMember = [field_name]
> cbo.DisplayValue = [field_name]
>
>ComboBox.DropDownStyle = DropDownList
>
>When the selected item changes, I want the combobox to
update a different
>datatable with the currently selected value. So I have
tried the following:
>
>cbo.DataBindings.Add("Text", m_dtLabel, "printer_lang")
>cbo.DataBindings.Add("SelectedText",
m_dtLabel, "printer_lang")
>cbo.DataBindings.Add("SelectedValue",
m_dtLabel, "printer_lang")
>cbo.DataBindings.Add("SelectedItem",
m_dtLabel, "printer_lang")
>
>None of these work (text / selectedText doesn't work
because its a
>DropDownList). I just can't seem to find the property
where the actual value
>is stored...
>
>Any suggestions?
>
>Framework 1.0
>VS.NET 2K2
>
>TIA,
>Jeremy
>
>.
>

Re: Data Binding & Controls by Jeremy

Jeremy
Wed Sep 03 11:13:11 CDT 2003

> cbo.SelectedValue

That doesn't work. When I try it, it throws an exception (option strict on),
because SelectedValue is a DataRowView.

With opt strict off, it sets the filed = "{System.DataRowView}", regardless
of the actual value.


Re: Data Binding & Controls by Jeremy

Jeremy
Wed Sep 03 14:51:09 CDT 2003

Is this question really that difficult? This is the third time I have posted
this with no _accurate_ response... If anyone has links, books, help
topics, or anything related please post it. Any/all help is greatly
appreciated!

TIA,
Jeremy