Hi
is it poseble to Search Combobox item by valuemember in TextChanged
Sample Combobox I use with multi-columns
https://www.codeproject.com/Articles...olumn-combobox
Thanks
ssalomon
Printable View
Hi
is it poseble to Search Combobox item by valuemember in TextChanged
Sample Combobox I use with multi-columns
https://www.codeproject.com/Articles...olumn-combobox
Thanks
ssalomon
You can simply set the ValueMember property to select the corresponding item in the control. If you just want to find the item rather than select then no, there's no way to do that built into the control. You would have to do it via the data source with knowledge of the type of the items. There is a more general way, using PropertyDescriptors, but that is convoluted and inefficient and not something you would want to do unless you were building a custom control with that generalised functionality. Using PropertyDescriptors is how the ValueMember/SelectedValue properties work in the first place. That's how you can specify the name of a DataColumn as the ValueMember when binding a DataTable.
Thanks jmcilhinney