如何在DataGridView中添加类似过滤器的Excel [英] How to add Excel like filter in DataGridView
本文介绍了如何在DataGridView中添加类似过滤器的Excel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
hi。
i正在使用Visual Studio 2010在C#中使用桌面应用程序。
我正在使用DataGridView控件来显示数据库中添加的记录(即MS Sqlserver 2005)。现在我希望我有一个像Microsoft Excel这样的顶级过滤行来过滤DataGridView中显示的记录。
我没有得到如何做到这一点。
任何想法都将受到赞赏。
再见。
hi.
i am working on a Desktop application in C# using Visual Studio 2010.
I am using a DataGridView control to display records added in the Database (which is MS Sqlserver 2005). Now i want that I have a top filter row like Microsoft Excel to filter records displayed in the DataGridView.
I am not getting how to do it.
Any kind of idea will be appreciated.
bye.
推荐答案
Range.AutoFilter方法和Worksheet.AutoFilter属性
http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.range.autofilter(VS.80)的.aspx 一> [ ^ ]
http://msdn.microsoft.com/en-us/library/microsoft.office.tools.excel.worksheet.autofilter.aspx [ ^ ]
http://forums.asp.net/t/924148.aspx?Add+AutoFilter+to+ Excel +文件+ in + c + [ ^ ]
Range.AutoFilter Method and Worksheet.AutoFilter Property
http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.range.autofilter(VS.80).aspx[^]
http://msdn.microsoft.com/en-us/library/microsoft.office.tools.excel.worksheet.autofilter.aspx[^]
http://forums.asp.net/t/924148.aspx?Add+AutoFilter+to+Excel+file+in+c+[^]
这篇关于如何在DataGridView中添加类似过滤器的Excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文