On Wed, 13 Aug 2003 16:28:45 +0100, "Rob Oldfield" <rob(an a in a
circle)realuk.co.uk> wrote:
>I have a windows form app that is bound to a dataview. If I add a combobox
>(with the default style of dropdown) and bind its text property to a field
>then everything is fine. If I now change the DropDownStyle to DropDownList
>then the binding no longer works (data from the back end SQL doesn't get
>displayed and if I select something in the combo then the update writes a
>null value back).
>
>I've tried binding to SelectedItem instead but that also doesn't work.
I found the combobox didn't fire the currencymanager change events so I added a
SelectedItemChanged event to the combo box:
private void State_Changed(object sender, System.EventArgs e)
{
if( bmb != null && UIActive )
// UIActive means user is changing it
{
String s = (string)State.Items[State.SelectedIndex]; // new val
dt.Rows[bmb.Position]["State"] = s; // force column change?
}
}
I was bound to the "state" column in the dataset...
/steveA
my email
(E-Mail Removed) is encrypted with ROT13 (
www.rot13.org)