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

推荐订阅源

V
Vulnerabilities – Threatpost
T
The Blog of Author Tim Ferriss
S
SegmentFault 最新的问题
D
DataBreaches.Net
博客园_首页
罗磊的独立博客
B
Blog
T
Threat Research - Cisco Blogs
C
Cisco Blogs
GbyAI
GbyAI
Engineering at Meta
Engineering at Meta
WordPress大学
WordPress大学
G
GRAHAM CLULEY
H
Help Net Security
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
爱范儿
爱范儿
SecWiki News
SecWiki News
T
Threatpost
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Schneier on Security
Schneier on Security
T
The Exploit Database - CXSecurity.com
Google Online Security Blog
Google Online Security Blog
T
Tor Project blog
小众软件
小众软件
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Y
Y Combinator Blog
H
Hacker News: Front Page
V
V2EX
Security Latest
Security Latest
Cloudbric
Cloudbric
Simon Willison's Weblog
Simon Willison's Weblog
Attack and Defense Labs
Attack and Defense Labs
D
Darknet – Hacking Tools, Hacker News & Cyber Security
P
Proofpoint News Feed
博客园 - 三生石上(FineUI控件)
NISL@THU
NISL@THU
S
Secure Thoughts
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
V2EX - 技术
V2EX - 技术
Vercel News
Vercel News
P
Palo Alto Networks Blog
IT之家
IT之家
MyScale Blog
MyScale Blog
有赞技术团队
有赞技术团队
Application and Cybersecurity Blog
Application and Cybersecurity Blog
D
Docker
Google DeepMind News
Google DeepMind News
Webroot Blog
Webroot Blog

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

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

控制行高和列宽
缺省使用控件内部设定的行高和列宽,针对整个Grid所有的行和列;
this.ultraGrid.DisplayLayout.Override.DefaultColWidth=-1
this.ultraGrid.DisplayLayout.Override.DefaultRowHeight=-1
那实际的行高和行宽并不是-1,究竟是多少呢?
this.ultraGrid.Rows[0].Height,行高为20
this.ultraGrid.DisplayLayout.Bands[0].Columns[0].Width,列宽为133
也可以使用以下方法:
this.ultraGrid1.Rows[0].Cells[0].Width得到列宽;
this.ultraGrid.Rows[0].Height=30可以改变行所在的band内的所有行的高度,而不影响其它band内的行高!
这样说好像不能让某一行有特殊的高度的。
同理this.ultraGrid.DisplayLayout.Bands[0].Columns[0].Width = 200可改变列宽!
同样是针对Grid中的所有列的。
有疑问:ultraGrid所有band内列宽必须是一样的?
DevExpress这家公司的好像就没这个要求。
注意:
this.ultraGrid1.Rows[0].Cells[0].Width这个属性是只读哦,不能改变列宽哦。

同样如果针对每个band,则可以使用:
 this.ultraGrid1.DisplayLayout.Bands[i].Override.DefaultRowHeight = 30;
 this.ultraGrid1.DisplayLayout.Bands[i].Override.DefaultColWidth  = 100;
这样可以让每个band有不同的行高!
但列宽是一样的,并且是设置为最大的那个。这个有点奇怪。

补充:看来误解ultraGrid了。不是所有的band中的列宽都必须一样的。可以设置的,只是缺省如此。
this.ultraGrid.DisplayLayout.Override.AllowColSizing = AllowColSizing.Free
这样设置后,则列宽可以自由调整了。