在textchange上过滤Datagridview中的值 [英] Filter values in Datagridview on textchange

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

问题描述

大家好,

以下是我的表格的链接

"http://i54.tinypic.com/nbve4l.jpg"

我想根据上述文本框中的文本更改来过滤datagridview中的值

请帮助

Hi All,

Below is the link to my form

"http://i54.tinypic.com/nbve4l.jpg"

I want to filter the values in datagridview according to the text change in the above textbox

Please help

推荐答案

您可以处理文本框的TextChanged事件,并根据在文本框中输入的文本绑定数据网格.
You can Handle TextChanged event of the textbox, and bind your datagrid as per the text entered in the textbox.


在发生文本更改事件时,如果您使用的是断开连接的体系结构,则可以在bindingSource上应用过滤器,或者创建数据视图,然后应用行过滤器,否则,如果您正在使用连接的体系结构,则相应地制定查询条件,或者对SQL使用linq linq到对象(如果您打算使用存储库框架).因此,有很多正确的方法.您在问哪个源代码?如果您没有提供足够的信息,您是否希望我们继续猜测?最好尝试一下,如果有任何问题,请卷土重来. Google对您有很大帮助.

祝你好运.
At the text changed event and if you are using disconnected architecture then you can apply filter on the bindingSource or create a dataview and apply a row filter else if you are using a connected architecture then formulate your query accordingly or use linq to sql, linq to objects (if you plan to use a repository framework). So there are lot of ways right. Which source code you are asking?. Do you want us to keep on guessing this or that when you haven''t provided enough information?. Better thing try yourself and comeback if you have any issues. Google help you much.

Good luck.


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

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