滤膜结合源或使用的BindingList textbox_keypress [英] filter binding source or bindinglist with textbox_keypress

查看:199
本文介绍了滤膜结合源或使用的BindingList textbox_keypress的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的WinForms和C#。

I use winforms and c#.

我怎么能过滤绑定源或绑定列表。一个文本框的文本?
,而我在一个文本框我的网格,以%类似的方法不是(=,等于)方法筛选我打字我MEAM。

How can I filter Binding source or binding list. with a textbox text ? I meam while I am typing in a textbox my grid is filtering with a %Like method not (=,equal)method.

感谢。

推荐答案

我用委托这个问题。一些类似的代码波纹管

I use delegate for this problem. Some code like bellow

        _List = _List.FindAll(
            delegate(MyEntity entity)
            {
                return entity.Title.Contains(TXT_Title.Text);
            }
        );
        Gview.DataSource = _List  ;

这篇关于滤膜结合源或使用的BindingList textbox_keypress的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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