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

推荐订阅源

爱范儿
爱范儿
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
G
GRAHAM CLULEY
www.infosecurity-magazine.com
www.infosecurity-magazine.com
V2EX - 技术
V2EX - 技术
The Last Watchdog
The Last Watchdog
S
Secure Thoughts
Webroot Blog
Webroot Blog
PCI Perspectives
PCI Perspectives
L
LINUX DO - 最新话题
Hacker News: Ask HN
Hacker News: Ask HN
N
News and Events Feed by Topic
H
Heimdal Security Blog
H
Help Net Security
T
The Blog of Author Tim Ferriss
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
Jina AI
Jina AI
Recent Commits to openclaw:main
Recent Commits to openclaw:main
F
Full Disclosure
小众软件
小众软件
S
Securelist
罗磊的独立博客
NISL@THU
NISL@THU
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cisco Blogs
云风的 BLOG
云风的 BLOG
C
CERT Recently Published Vulnerability Notes
Cisco Talos Blog
Cisco Talos Blog
Know Your Adversary
Know Your Adversary
S
Schneier on Security
D
DataBreaches.Net
M
MIT News - Artificial intelligence
V
Vulnerabilities – Threatpost
N
News and Events Feed by Topic
有赞技术团队
有赞技术团队
F
Fortinet All Blogs
T
Tenable Blog
The Register - Security
The Register - Security
C
Check Point Blog
AWS News Blog
AWS News Blog
Cloudbric
Cloudbric
C
CXSECURITY Database RSS Feed - CXSecurity.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
C
Cyber Attacks, Cyber Crime and Cyber Security
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google Online Security Blog
Google Online Security Blog
博客园 - 叶小钗
Hacker News - Newest:
Hacker News - Newest: "LLM"
博客园 - 司徒正美

博客园 - 木人(我现在不是老大)

ERP系统的专业化发展趋势 讨厌的real和float数据 Svcutil使用点滴 windows server2003企业版64位安装sql server2008企业版64位 读书笔记 UltraGrid(16) 水晶报表使用push模式(2) 水晶报表使用push模式(1) SQL SERVER2000存储过程调试 读书笔记 UltraGrid(15) 读书笔记 UltraGrid(14) 读书笔记 UltraGrid(11) 读书笔记 UltraGrid(10) 读书笔记 UltraGrid(9) 读书笔记 UltraGrid(8) 读书笔记 UltraGrid(7) 读书笔记 UltraGrid(6) 读书笔记 UltraGrid(5) 读书笔记 UltraGrid(4) 读书笔记 UltraGrid(3)
读书笔记 UltraGrid(12)
木人(我现在不是老大) · 2012-02-13 · via 博客园 - 木人(我现在不是老大)

呈现数据
1.使用未绑定列
可通过UltraGridBand中的Columns来增加column。
限制条件:必须有一个绑定的列!
2.通常未绑定列是计算字段。
例:band.Columns.Add("OrdrAmt1","金额");
band.Columns["OrdrAmt1"].Formula = "[OrdrSqr]*[OrdrPrc]";
需要注意的是如果使用了计算字段,则要增加UltraCalcManager如下:
UltraCalcManager calc = new UltraCalcManager(this.ultraGrid1.Container);
this.ultraGrid1.CalcManager = calc;
3.格式化数据
通过UltraGridColumn的ValueBasedAppearance来设置。
如:
ConditionValueAppearance cva = new ConditionValueAppearance();
OperatorCondition oc = new OperatorCondition(ConditionOperator.GreaterThanOrEqualTo, 1000);
Infragistics.Win.Appearance apce1=new Infragistics.Win.Appearance("apce1");
apce1.ForeColor =Color.Blue ;
cva.Add(oc, apce1);
band.Columns["OrdrAmt1"].ValueBasedAppearance = cva;
这样的结果将OrdrAmt1<=1000的前景色设置为红色;
4.NetAdvantage提供多个条件类支持格式化:
OperatorCondition:操作符条件,如>、=、<>等,还有一些字符串的操作如包含、以...开始;
FormulaCondition:公式条件,不支持逻辑操作符哦;
ConditionGroup:组合条件,如将OperatorCondition和FormulaCondition组合;
ComplementCondition:剩余条件,个人觉得只是方便建立条件而已,使用FormulaCondition也是可以的。
TrueCondition:真条件。这个有点特殊,条件按顺序解析的。如果已经解析,则不会在以TrueCondition覆盖。
5.ConditionGroup示例如下:
ConditionValueAppearance cva = new ConditionValueAppearance();
OperatorCondition oc = new OperatorCondition(ConditionOperator.GreaterThanOrEqualTo, 1000);
FormulaCondition fc = new FormulaCondition(formulaProvider, "[OrdrAmt1]<=5000");
ConditionGroup cg = new ConditionGroup();
cg.Add(oc);
cg.Add(fc);
cg.CombineOperator = LogicalOperator.And;
Infragistics.Win.Appearance apce1 = new Infragistics.Win.Appearance("apce1");
apce1.ForeColor = Color.Yellow;
apce1.BackColor = Color.Black;
cva.Add(cg, apce1);