-
大小: 71KB文件类型: .zip金币: 1下载: 0 次发布日期: 2021-06-10
- 语言: C#
- 标签: DataGridView C# 数据筛选 类似EXCEL
资源简介
DataGridView列标头带数据筛选功能(含C#源码DEMO)), 类似Excel筛选功能的 DataGridView 源代码,调用简单,功能好用,C#示例都有。筛选后状态栏显示过滤后的条数及显示全部的HPLINK标签按钮。
代码片段和文件信息
//---------------------------------------------------------------------
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//THIS CODE AND INFORMATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY
//KIND EITHER EXPRESSED OR IMPLIED INCLUDING BUT NOT LIMITED TO THE
//IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
//PARTICULAR PURPOSE.
//---------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.Visualstyles;
using System.Collections;
using System.Reflection;
namespace DataGridViewAutoFilter
{
///
/// Provides a drop-down filter list in a DataGridViewColumnHeaderCell.
///
public class DataGridViewAutoFilterColumnHeaderCell : DataGridViewColumnHeaderCell
{
///
/// The ListBox used for all drop-down lists.
///
private static FilterListBox dropDownListBox = new FilterListBox();
///
/// A list of filters available for the owning column stored as
/// formatted and unformatted string values.
///
private System.Collections.Specialized.OrderedDictionary filters =
new System.Collections.Specialized.OrderedDictionary();
///
/// The drop-down list filter value currently in effect for the owning column.
///
private String selectedFilterValue = String.Empty;
///
/// The complete filter string currently in effect for the owning column.
///
private String currentColumnFilter = String.Empty;
///
/// Indicates whether the DataGridView is currently filtered by the owning column.
///
private Boolean filtered;
///
/// Initializes a new instance of the DataGridViewColumnHeaderCell
/// class and sets its property values to the property values of the
/// specified DataGridViewColumnHeaderCell.
///
/// The DataGridViewColumnHeaderCell to copy property values from.
public DataGridViewAutoFilterColumnHeaderCell(DataGridViewColumnHeaderCell oldHeaderCell)
{
this.ContextMenuStrip = oldHeaderCell.ContextMenuStrip;
this.ErrorText = oldHeaderCell.ErrorText;
this.Tag = oldHeaderCell.Tag;
this.ToolTipText = oldHeaderCell.ToolTipText;
this.Value = oldHeaderCell.Value;
this.ValueType = oldHeaderCell.ValueType;
// Use Hasstyle to avoid creating a new style object
// when the style property has not previously been
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2007-12-04 14:48 CS\
目录 0 2007-12-04 14:48 CS\DataGridViewAutoFilter\
目录 0 2007-12-04 14:48 CS\DataGridViewAutoFilter\DataGridViewAutoFilter\
文件 1977 2007-11-28 12:13 CS\DataGridViewAutoFilter\DataGridViewAutoFilter.sln
文件 2173 2007-11-28 12:13 CS\DataGridViewAutoFilter\DataGridViewAutoFilter\DataGridViewAutoFilter.csproj
文件 68492 2007-11-28 15:33 CS\DataGridViewAutoFilter\DataGridViewAutoFilter\DataGridViewAutoFilterColumnHeaderCell.cs
文件 6939 2007-11-28 12:13 CS\DataGridViewAutoFilter\DataGridViewAutoFilter\DataGridViewAutoFilterTextBoxColumn.cs
目录 0 2007-12-04 14:48 CS\DataGridViewAutoFilter\DataGridViewAutoFilter\Properties\
文件 1419 2007-11-28 12:13 CS\DataGridViewAutoFilter\DataGridViewAutoFilter\Properties\AssemblyInfo.cs
目录 0 2007-12-04 14:48 CS\DataGridViewAutoFilter\DesignerSetupDemo\
文件 1 2007-12-03 15:15 CS\DataGridViewAutoFilter\DesignerSetupDemo\ClassDiagram1.cd
文件 4166 2007-12-03 15:16 CS\DataGridViewAutoFilter\DesignerSetupDemo\DesignerSetupDemo.csproj
文件 2812 2007-11-28 15:01 CS\DataGridViewAutoFilter\DesignerSetupDemo\DesignerSetupForm.cs
文件 10666 2007-12-04 12:03 CS\DataGridViewAutoFilter\DesignerSetupDemo\DesignerSetupForm.Designer.cs
文件 6432 2007-11-28 15:01 CS\DataGridViewAutoFilter\DesignerSetupDemo\DesignerSetupForm.resx
文件 496 2007-11-28 15:01 CS\DataGridViewAutoFilter\DesignerSetupDemo\Program.cs
目录 0 2007-12-04 14:48 CS\DataGridViewAutoFilter\DesignerSetupDemo\Properties\
文件 1286 2007-11-28 15:01 CS\DataGridViewAutoFilter\DesignerSetupDemo\Properties\AssemblyInfo.cs
文件 2861 2007-11-28 15:01 CS\DataGridViewAutoFilter\DesignerSetupDemo\Properties\Resources.Designer.cs
文件 5612 2007-11-28 15:01 CS\DataGridViewAutoFilter\DesignerSetupDemo\Properties\Resources.resx
文件 1100 2007-11-28 15:01 CS\DataGridViewAutoFilter\DesignerSetupDemo\Properties\Settings.Designer.cs
文件 249 2007-11-28 15:01 CS\DataGridViewAutoFilter\DesignerSetupDemo\Properties\Settings.settings
文件 32186 2007-12-04 12:03 CS\DataGridViewAutoFilter\DesignerSetupDemo\TestData.Designer.cs
文件 3 2007-11-28 15:01 CS\DataGridViewAutoFilter\DesignerSetupDemo\TestData.xsc
文件 1114 2007-12-04 12:04 CS\DataGridViewAutoFilter\DesignerSetupDemo\TestData.xsd
文件 3 2007-11-28 15:01 CS\DataGridViewAutoFilter\DesignerSetupDemo\TestData.xss
目录 0 2007-12-04 14:48 CS\DataGridViewAutoFilter\ProgrammaticSetupDemo\
文件 504 2007-11-28 12:13 CS\DataGridViewAutoFilter\ProgrammaticSetupDemo\Program.cs
文件 3261 2007-11-28 12:13 CS\DataGridViewAutoFilter\ProgrammaticSetupDemo\ProgrammaticSetupDemo.csproj
文件 5290 2007-11-28 12:13 CS\DataGridViewAutoFilter\ProgrammaticSetupDemo\ProgrammaticSetupForm.cs
目录 0 2007-12-04 14:48 CS\DataGridViewAutoFilter\ProgrammaticSetupDemo\Properties\
............此处省略7个文件信息
- 上一篇:listview控件可编辑单元格
- 下一篇:C#加密(DES)
相关资源
- C#加密(DES)
- c#自动录音
- 物资管理系统C#Access数据库简单应用
- C#画图软件-源程序代码
- 简易的点菜系统C#
- C#多人联机绘图程序,绘图,程序
- C#开发cad画图软件 GDI+
- C# CAD画图软件
- C# 自动排课系统
- C#winform DataGridView checkbox复选框 实现
- C# 钩子实现键盘和鼠标的全部事件全
- 源码:C#操作CSV,C#读取CSV
- c# winform 漂亮的第三方控件
- ModBus协议C#实现源码
- P2P远程控制C#.net二次开发源码
- System.Data.SQLite.dll ;C#(.net)连接SQ
- C# winform 窗体任务栏颜色闪烁提示仿
- C# winform 实时消息提示框
- 用C#写的简单的心理测试程序
- C#图书借阅管理系统实现
- C# 获取数码相机照片各种属性
- cpu,内存使用,硬盘读写,网络监控
- C#并口打印机ESC指令开发Demo
- c#读取外部程序 SysListView32、ListView2
- 画图板C#源码(有点像Windows画图)
- C#的ListView在VirtualMode模式下带CheckBo
- C#间接平差程序
- C#编写的RFID低频卡简易考勤系统需要
- 比较C#代码文件 比较C#文件 比较C#代码
- 图书馆管理系统C#
评论
共有 条评论