过滤DataGridView [英] Filtering DataGridView

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

问题描述

现在我只通过文本框中的文字进行过滤。 

Now I'm filtering only by text from textbox. 

Dim dataView As New DataView(datatable)
        dataView.RowFilter = String.Format("Pob like '%" & findDate.Text & "%'")
        tabela.DataSource = dataView


我正在寻找从(findDateFrom.Text)到(findDateTo.Text)过滤日期的功能。



有什么想法吗? :)
$



I'm looking for the ability to filter date from (findDateFrom.Text) to (findDateTo.Text).

Any ideas? :)


推荐答案

我认为你需要格式化它这个

I think you need to format it like this

View.RowFilter="DateCol >=#" & findDateFrom.text & "# AND DateCol <=#" & findDateTo.text & "#"


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

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