从文本框值到Datagridview的动态过滤 [英] Dynamic filtration from a textbox value into datagridview

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

问题描述

先生,我想在文本框中输入一些单词,它应该根据该单词动态过滤.并应显示在gridView

Sir, i want to input some words in the textbox ,dynamically it should filtrate according to that words.and should display in the gridView

推荐答案

步骤:
1. OnTextChange或OnKeyPress事件(适合您的情况),在文本框中获取现有值
2.使用该值过滤数据集中的数据.您可以使用Dataview.
3.使用过滤后的DataView数据重新绑定网格

完毕!试试吧!

如果需要,请参阅:数据视图行过滤器 [ ^ ]
Steps:
1. OnTextChange or OnKeyPress event (whichever suits you), take the existing value in the textbox
2. Filter the data in the dataset using the value. You can use a Dataview for it.
3. Re-Bind the grid with the filtered data of DataView

Done! Try!

If needed, see: Dataview Rowfilter[^]


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

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