M
memead
I have a combobox displaying the full name of a customer (e.g. John Smith)
and would like to go to the LAST name whenever a user presses a key while on
this combobox. I have looked at the AutoCompleteMode and AutoCompleteSource
properties of the combobox, but they only key off of the FIRST name (e.g.
pressing "B" will select "Bob Smith", not "Sam Barnes"). Even FindString and
FindStringExact only appear to key off of the prefix. This combobox,
cboCustomer, has a .DataSource set to a DataView (dv) which contains two
fields, the customer's name (e.g. "John Smith") and their customer number
(e.g. 12345). The .ValueMember of this combobox is dv.CustomerNumber and the
..DisplayMember is set to dv.FullName. How can I set the AutoCompleteSource
(?) to be a substring (Last Name) of the .DisplayMember (Full Name)? I
looked at Ken Tucker's response in "Typing in a ComboBox" (04/12/2006) and it
look interesting, but I do not know if this would help me. Any help is
appreciated.
Thank you.
and would like to go to the LAST name whenever a user presses a key while on
this combobox. I have looked at the AutoCompleteMode and AutoCompleteSource
properties of the combobox, but they only key off of the FIRST name (e.g.
pressing "B" will select "Bob Smith", not "Sam Barnes"). Even FindString and
FindStringExact only appear to key off of the prefix. This combobox,
cboCustomer, has a .DataSource set to a DataView (dv) which contains two
fields, the customer's name (e.g. "John Smith") and their customer number
(e.g. 12345). The .ValueMember of this combobox is dv.CustomerNumber and the
..DisplayMember is set to dv.FullName. How can I set the AutoCompleteSource
(?) to be a substring (Last Name) of the .DisplayMember (Full Name)? I
looked at Ken Tucker's response in "Typing in a ComboBox" (04/12/2006) and it
look interesting, but I do not know if this would help me. Any help is
appreciated.
Thank you.