自动完成组合框 [英] Auto complete Combobox

查看:76
本文介绍了自动完成组合框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个数据表,有客户列表,并且已经绑定在组合框中
喜欢..

I have one Datatable it''s have Customer list and already bind in combobox
like..

DataTable dataTable = objQBLayer.dtCustomQuery;
           CmbSelctCustomer.DisplayMember = "Name";
           CmbSelctCustomer.DataSource = dataTable;



但是..我想要组合框索引0中的默认字符串,例如选择客户"
我需要在组合框中自动完成..



but.. i want default string in combobox index 0 like "Select Customer"
and i need auto complete in combobox..

推荐答案

您的问题使我感到困惑.您说您想要组合框中的默认字符串,例如选择客户",然后为此您说您需要自动完成组合框.这不是自动完成属性.您只需更改combobox的text属性即可.以下是自动完成组合框的一些链接..
http://www.c-sharpcorner.com/Blogs/2050/ [ http://www.java2s.com/Tutorial/CSharp/0460__GUI-Windows-Forms/AutoCompleteComboBox.htm [^ ]
Your question confuses myself.You say you want default string in combobox like "Select Customer",then you say for this you need autocomplete combobox.This isn''t a property of autocompleteness.You can simply change the text property of combobox to do this.Hence below are some links for autocomplete combobox..
http://www.c-sharpcorner.com/Blogs/2050/[^]
http://www.java2s.com/Tutorial/CSharp/0460__GUI-Windows-Forms/AutoCompleteComboBox.htm[^]


like



like



DataTable dataTable = objQBLayer.dtCustomQuery;
          CmbSelctCustomer.DisplayMember = "Name";
          CmbSelctCustomer.DataSource = dataTable;
          this.CmbSelctCustomer.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
          this.CmbSelctCustomer.AutoCompleteSource = AutoCompleteSource.ListItems;


这篇关于自动完成组合框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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