惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
T
Threatpost
Latest news
Latest news
N
News | PayPal Newsroom
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
AI
AI
Simon Willison's Weblog
Simon Willison's Weblog
TaoSecurity Blog
TaoSecurity Blog
The Last Watchdog
The Last Watchdog
L
LINUX DO - 热门话题
Google DeepMind News
Google DeepMind News
T
Threat Research - Cisco Blogs
O
OpenAI News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
The Exploit Database - CXSecurity.com
NISL@THU
NISL@THU
Application and Cybersecurity Blog
Application and Cybersecurity Blog
S
Securelist
小众软件
小众软件
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Martin Fowler
Martin Fowler
S
SegmentFault 最新的问题
Cisco Talos Blog
Cisco Talos Blog
云风的 BLOG
云风的 BLOG
AWS News Blog
AWS News Blog
GbyAI
GbyAI
N
News and Events Feed by Topic
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
美团技术团队
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
S
Schneier on Security
博客园 - 聂微东
V2EX - 技术
V2EX - 技术
T
Troy Hunt's Blog
SecWiki News
SecWiki News
S
Secure Thoughts
B
Blog RSS Feed
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
腾讯CDC
H
Heimdal Security Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International News Feed

博客园 - jenner

js 更改 onclick 事件 - jenner js 去除字符串中重复的字符 - jenner - 博客园 js 获取选中的checkbox的行的其他值 javactript关闭窗体,刷新父窗体....... - jenner - 博客园 js实现动态级联计分,级数无限制 - jenner - 博客园 winform dgv右键选择 - jenner - 博客园 DataGrid 二维表头 DataGrid导出到Excel or word javascript 对datagrid的一些操作 - jenner - 博客园 javascript 判断整数 javascript控制服务器控件-js操作CheckBoxList实现全选、反选 css控制字数(控制宽度) 网站变黑白 漂浮div窗体,带停止 111 test 使用QuickCHM软件轻松编译CHM格式的文件 遍历treeView的所有节点 TreeView第三种状态的另类实现
DataView 属性操作 - jenner - 博客园
jenner · 2008-07-22 · via 博客园 - jenner

a,使用sort属性对数据进行排序

thisView.Sort = "ProductName ASC";

or

thisView.Sort = "Age ASC , Name DESC";

b,使用RowFilter属性对数据过滤

thisView.RowFilter =

"ID = 10";

"Num <= 10";

"Date > 1/1/1999 and Date <= 2/2/2005";

"Product in ('apple','cat','table')"

"Text like = '*son'";

注:使用的各条件可用 and 继续添加,在使用 *** in ('','','') 时,注意括号内的项目不易过多,估计能支持十几个.


1,按一对x,y坐标筛选数据 x1 x2 y1 y2

thisView .RowFilter =
"HZBY >= '" + x1 + "' and HZBY <= '" + x2 + "' and ZZBX >= '" + y1 + "' and ZZBX <= '" + y2 + "'";

2,由数组生成筛选条件

//格式为 DataView.Filter = "GZDYMC IN ('job','tree',work')";

string strView = "GZDYMC in (";
int ii = 0;
while(ii < ColTrueNames.Count)
{
strView += "'" + ColTrueNames[ii] + "',";
ii++;
}

strView += "'null')";
thisView.RowFilter = strView;