如何在DataGridView控件中实现过滤? [英] How can I implement filtering in the DataGridView control?

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

问题描述

我想开发一个使用DataGridView显示表中数据的应用程序。而且我想将过滤器行添加到DataGridView。这意味着当用户单击过滤器按钮时,DataGridView应该在DataGridView的开头添加一个空行。如果用户输入一些数据,根据DataGridView中显示的字段,DataGridView应提供与特定单元格输入中输入相关的快速过滤。

I want to develop an application which uses a DataGridView for showing the data from the table. And I want to add the filter row to the DataGridView. It means when the user clicks on the filter button then the DataGridView should add an empty row at the beginning of the DataGridView. And if the user inputs some data, depending on the fields which present in the DataGridView, then the DataGridView should provide the quick filtering related to the input in the specific cell input.

有人可以帮我做这个吗?

Can anybody help me do this?

推荐答案

很难从你的问题中得知你正在努力做什么。一般来说,人们不会给你一个完整的,工作的解决方案作为答案。您将不得不自己做编程工作我们只是在这里帮忙,如果你遇到了一个陷阱,不要写你的代码给你。

今后,请尽可能多地努力你的问题,而不是简单地发布你的要求

It's hard to tell from your question what exactly you're trying to do. In general, people are not going to give you a complete, working solution as an answer. You'll have to do most of the programming work yourself; we're only here to help out if you run into a snag along the way, not write your code for you.
In the future, please try to put more effort into your questions than simply posting your requirements.

据说你可能想查看这些示例项目:

That being said, you might want to check out these sample projects:

  • DataGridView Filter Popup
  • DataGridView Filter Popup (yes, these are two different articles, despite having the same name)
  • Datagridview with filtering capability
  • A Filter Dialog for a DataGridView
  • DataGridView Filtering User Control

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

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