带有文本框的AutocompleteCustomSource [英] AutocompleteCustomSource with textbox

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

问题描述

我需要将数据从数据库绑定到文本框

当我在文本框中搜索它应该工作建议并附加..........

i need to bind the datas from the database to textbox
when i search in the textbox it should work the suggest and append..........

推荐答案

Hi
AutoComplete是一个ASP.NET AJAX扩展程序,可以附加到任何TextBox控件,并将该控件与弹出面板关联,以显示以在文本框中键入前缀。

Yours Farhad。
Hi AutoComplete is an ASP.NET AJAX extender that can be attached to any TextBox control, and will associate that control with a popup panel to display words that begin with the prefix typed into the textbox.
Yours Farhad.


如果获胜表单试试这个



if win form try this

public void AutoComplete() 
{
AutoCompleteStringCollection AutoItem = new AutoCompleteStringCollection();
foreach (DataRow rw in Dt.rows)
{
AutoItem.Add(Rw["columnname"].ToString());
 
}
texbox.AutoCompleteMode = AutoCompleteMode.Suggest;
texbox.AutoCompleteSource = AutoCompleteSource.CustomSource;
texbox.AutoCompleteCustomSource = AutoItem;
}


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

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