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

推荐订阅源

J
Java Code Geeks
Stack Overflow Blog
Stack Overflow Blog
B
Blog RSS Feed
C
Check Point Blog
D
Docker
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
博客园_首页
Apple Machine Learning Research
Apple Machine Learning Research
量子位
有赞技术团队
有赞技术团队
IT之家
IT之家
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
M
MIT News - Artificial intelligence
B
Blog
阮一峰的网络日志
阮一峰的网络日志
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
腾讯CDC
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
V2EX
月光博客
月光博客

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

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

数据呈现
1.单元格合并。
缺省是不合并的。
this.ultraGrid1.DisplayLayout.Override.MergedCellStyle = MergedCellStyle.Always;所有的band中的column总是合并。
OnlyWhenSorted:仅当排序的时候再合并。
在band\column级别都有MergedCellStyle,即可只针对band和column来设置单元格合并;
注意:如果子级别对象已经修改,父级别对象的属性不会覆盖,所以:
this.ultraGrid1.DisplayLayout.Bands[1].Columns["SpecWth"].MergedCellStyle = MergedCellStyle.Never;
this.ultraGrid1.DisplayLayout.Bands[1].Columns["SpecHgt"].MergedCellStyle = MergedCellStyle.Never;
this.ultraGrid1.DisplayLayout.Bands[0].Override.MergedCellStyle = MergedCellStyle.Never;           
this.ultraGrid1.DisplayLayout.Override.MergedCellStyle = MergedCellStyle.Always;
的执行效果和
this.ultraGrid1.DisplayLayout.Override.MergedCellStyle = MergedCellStyle.Always;
this.ultraGrid1.DisplayLayout.Bands[0].Override.MergedCellStyle = MergedCellStyle.Never;
this.ultraGrid1.DisplayLayout.Bands[1].Columns["SpecWth"].MergedCellStyle = MergedCellStyle.Never;
this.ultraGrid1.DisplayLayout.Bands[1].Columns["SpecHgt"].MergedCellStyle = MergedCellStyle.Never;
的执行效果是一样的。
2.确定了合并,还有确定合并的方式,有MergeSameValue和MergeSameText两种方式。
当然合并方式只是针对具体的列的。
设置所有的列,可以用一个循环处理;
foreach(UltraGridColumn ugc in ultraGrid1.DisplayLayout.Bands[1].Columns)
   ugc.MergedCellEvaluationType = MergedCellEvaluationType.MergeSameText;
         
3.隐藏列
this.ultraGrid1.DisplayLayout.Bands[0].Columns[1].Hidden = true;
4.列顺序
this.ultraGrid1.DisplayLayout.Bands[0].Columns[2].Header.VisiblePosition = 4;
注意这个顺序包含隐含列哦。
这个属性为什么不在Column上呢?

posted on 2012-02-14 13:30  木人(我现在不是老大)  阅读(481)  评论()    收藏  举报