按字母顺序在组合框中选择名称 [英] Selecting name in comboBox alphabetically

查看:109
本文介绍了按字母顺序在组合框中选择名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用C#2.0和SQL Server 2005开发了一个Windows应用程序。在应用程序中,有许多可用于操作数据的表单。在一种形式中,我使用了一个comboBox控件,通过加载该表单从数据库中检索数据。在那个特定的组合框中,可以使用许多医生名称。

例如: - Alok Saha,Anand Kumar,Balaram Sinha,Dr.Mazhar Alam,Kanchan Saha博士,Riyaz Alam博士等。

我想选择一名医生通过在组合框中按一个或两个字母来命名。

例如: - Al为Alok Saha,An为Anand Kumar和Dr.M为Dr.Mazhar Alam等。

我的任务是做,我无法解决。请有人帮助我。

当我在组合框中输入'Al'时,所有以'Al'开头的医生名称都应突出显示。

I developed a windows application by using C#2.0 and SQL Server 2005. In the application there are many forms available to manipulate data. In one form I used a comboBox control where data would be retrieved from database by loading that form. In that particular comboBox many Doctor Name is available.
E.g.:- Alok Saha, Anand Kumar, Balaram Sinha, Dr.Mazhar Alam, Dr. Kanchan Saha, Dr. Riyaz Alam etc.
I want to select a doctor name by pressing one or two alphabets into the comboBox.
E.g. :- Al for Alok Saha, An for Anand Kumar and Dr.M for Dr.Mazhar Alam etc.
Its my task to do , I am unable to solve it. Please someone help me .
When I will enter ’Al’ in the comboBox all the doctor name starting with ‘Al ‘ should be highlighted.

推荐答案

从这里开始 - Google搜索 - 自动完成组合框c# [ ^ ]
Start here - Google search - auto complete combobox c#[^]


使用 AutoCompleteMode [ ^ ] ComboBox的属性;)
Use AutoCompleteMode[^] property of ComboBox ;)


推荐此链接

http://www.mrexcel.com/forum/microsoft-access/258781-sorting-combo-box-names-ascending-order。 html [ ^ ]


这篇关于按字母顺序在组合框中选择名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆