Retrieving the ValueMember of a combobox.
Hello,
The datasource of a combobox and the datasource of a datagridview are one
and the same bindingsource.
The combobox has a DropDown DropDownStyle, in order to be able to enter data
manually in the textbox of the combobox.
When I choose data from the dropdownlist, I can retrieve the corresponding
ValueMember of that item.
When I enter a value (that is an item of the dropdownlist) manually in the
textbox of the combobox, no ValueMember is passed.
My questions are:
1 How can I get the ValueMember of the item I manually type in the textbox
of the combobox, providing of course it is an item that is part of the
dropdownlist?
2 How can I detect if the value typed manually is an item belonging to the
dropdownlist?
2 How can I make sure the corresponding row in the datagridview is
positioned on top of the datagrid (as first visible row)?
Many thanks and greetings from Brugge (Bruges - Belgium),
Michel
Date:Thu, 12 Jul 2007 18:21:51 +0200
Author:
|