
Signature
HTH,
Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com
In case of Minimalism, break Philip Glass.
> Thanks that now works when searching on the Text of the combobox.
>
[quoted text clipped - 40 lines]
>> >
>> > How do you select a value based on a supplied parameter?
I am looking for something like ComboBox.FindValue
A scenario would be a value passed from a data source which is the
value of an item in a combobox which has a text value which is a
description.
e.g. from an employee record it selects a departmentid which then is
selected in a combobox but displays the Department name.
> I'm not sure what you're asking, as all you have talked about is an
> ArrayList, which is a collection of type object, and a ComboBox, which has
[quoted text clipped - 62 lines]
> >> >
> >> > How do you select a value based on a supplied parameter?
Jeff Gaines - 23 Jan 2007 15:06 GMT
On 23/01/2007 in message
<1169560293.124313.238150@l53g2000cwa.googlegroups.com>
>I am looking for something like ComboBox.FindValue
>
[quoted text clipped - 3 lines]
>e.g. from an employee record it selects a departmentid which then is
>selected in a combobox but displays the Department name.
There are probably several options.
You could iterate through the Combo Box items, cast them to the original
class you added them as and look for the ID.
You could have a function in the class which links the id to the displayed
text, interrogate the class with the id and it returns the text to find in
the Combo Box.
You could maintain a hash table which links the department id to a
department name (or even id to Combo Box index, although that would entail
a bit more work).

Signature
Jeff Gaines
Kevin Spencer - 23 Jan 2007 21:10 GMT
Ok, let me be a bit clearer. In order to answer your question, could you
answer a couple for me?
1. Is the ComboBox databound?
2. Is the ComboBox databound to more than one list (e.g. DataTables, one for
values, and one for display)?
3. What is the data type of the values in the ComboBox?

Signature
HTH,
Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com
In case of Minimalism, break Philip Glass.
>I am looking for something like ComboBox.FindValue
>
[quoted text clipped - 77 lines]
>> >> >
>> >> > How do you select a value based on a supplied parameter?
robin9876@hotmail.com - 25 Jan 2007 13:55 GMT
1) No
2) No
3) String
> Ok, let me be a bit clearer. In order to answer your question, could you
> answer a couple for me?
[quoted text clipped - 100 lines]
>
> >> >> > How do you select a value based on a supplied parameter?