comboBox SelectedValue behaviour
From: Gary Boulter (GaryBoulter_at_discussions.microsoft.com)
Date: 11/29/04
- Next message: erdem: "Working with c# and vb.net at the same time"
- Previous message: Sergiu Cojocaru: "DataGrid bool column winforms..."
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 29 Nov 2004 04:55:03 -0800
hi,
I have an object populated from the database, The object has three properties,
the ID, a description, and a State
If I bind the object as a collection to a combo
comboBox.DataSourse = <objectcollection>
comboBox.DisplayMember = "description"
comboBox.ValueMember = "ID"
Regardless when I bind the objectcollection to the DataSourse property I get
the same results.
When I get the SelectedValue of the comboBox it returns the selectedIndex
value and not the expected 'ID".
Has anyone else seen this behaviour and know of a workaround
Thanks
Gary
- Next message: erdem: "Working with c# and vb.net at the same time"
- Previous message: Sergiu Cojocaru: "DataGrid bool column winforms..."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|