根据在文本框中输入的文本搜索列表视图 [英] Search a listview based on text entered in textbox

查看:86
本文介绍了根据在文本框中输入的文本搜索列表视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



根据在文本框中输入的文本过滤列表视图.
如果我输入"ha",则它应与名称字段匹配,并在没有其他记录引发错误的情况下显示listview.

Hi,

Filter the listview based on text entered in textbox.
If I enter "ha" it should match with name field and display listview if any records else raise a error.

推荐答案

看看 ListView.FindItemWithText [ ^ ]方法. :)

[在操作注释后编辑]
您想根据在TextBox中输入的文本过滤ListView.我为您提供了一个示例链接,可以完全满足您的需求.
现在,您想从我这里为您的问题提出答案.我的答案是相同的,因为问题是相同的.如果您详细阐述并解释您的具体问题是什么,我会尽力帮助您,但只要您有特定的信息,这就是我所能做的.
[/EDIT]
Have a look at this[^] MSDN article.
The first example (To find an item using text) from the article demonstrates the usage ListView.FindItemWithText[^] method. :)


You wanted to filter a ListView based on a text entered in TextBox. I gave you a link with example that does exactly what you want.
Now you want from me to suggest an answer for your question. My answer is the same, because the question is the same. If you elaborate and explain what is your specific problem I''ll do my best in order to help you but with given information from you, that is all I can do.
[/EDIT]


这篇关于根据在文本框中输入的文本搜索列表视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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