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

推荐订阅源

aimingoo的专栏
aimingoo的专栏
WordPress大学
WordPress大学
阮一峰的网络日志
阮一峰的网络日志
博客园 - 司徒正美
月光博客
月光博客
宝玉的分享
宝玉的分享
Recent Announcements
Recent Announcements
小众软件
小众软件
H
Hackread – Cybersecurity News, Data Breaches, AI and More
美团技术团队
博客园 - 三生石上(FineUI控件)
A
About on SuperTechFans
J
Java Code Geeks
云风的 BLOG
云风的 BLOG
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
IT之家
IT之家
Vercel News
Vercel News
量子位
Martin Fowler
Martin Fowler
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Visual Studio Blog
腾讯CDC
有赞技术团队
有赞技术团队

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

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)  评论()    收藏  举报