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

推荐订阅源

S
Secure Thoughts
Security Latest
Security Latest
Simon Willison's Weblog
Simon Willison's Weblog
O
OpenAI News
GbyAI
GbyAI
L
LINUX DO - 最新话题
A
Arctic Wolf
T
Tor Project blog
G
GRAHAM CLULEY
I
InfoQ
博客园_首页
IT之家
IT之家
The Register - Security
The Register - Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
Blog — PlanetScale
Blog — PlanetScale
N
Netflix TechBlog - Medium
K
Kaspersky official blog
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
U
Unit 42
PCI Perspectives
PCI Perspectives
量子位
P
Palo Alto Networks Blog
S
Securelist
T
Troy Hunt's Blog
博客园 - 【当耐特】
Recorded Future
Recorded Future
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
Engineering at Meta
Engineering at Meta
T
The Blog of Author Tim Ferriss
博客园 - 聂微东
罗磊的独立博客
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
NISL@THU
NISL@THU
C
Cisco Blogs
T
Threatpost
有赞技术团队
有赞技术团队
Forbes - Security
Forbes - Security
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
T
The Exploit Database - CXSecurity.com
Cloudbric
Cloudbric
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
C
Cyber Attacks, Cyber Crime and Cyber Security

博客园 - Gofficer

决战紫禁之巅 为学 C#网页自动登录和提交POST信息的多种方法 一个C#写的调用外部进程类 快速实现在Windows应用程序中支持拖拽的TreeView控件(C#) PPT转图片 开发人员,敢问路在何方? C# 实现注销、关机、重启电脑功能 如何用一条sql取得第10到第20条的记录? 用Sandcastle一键生成CHM帮助文档 实现服务器端与客户端对话 C#中访问WEB页面 使用代理服务器 自定义Ping方法 HTTP请求和应答 Socket套接字实现服务器端连接 Socket套接字实现客户端连接 启动和停止本地系统进程 异常处理
ultraGrid 控件中,实现单元格内容换行显示
Gofficer · 2008-01-09 · via 博客园 - Gofficer

有一个备注的内容需要在界面上显示,由于备注内容可能比较多,单行的单元格往往显示不全,所以希望能够多行显示,以便用户查看。

实现换行显示需要如下代码:

ultraGrid1.DisplayLayout.Bands[0].Columns["备注"].CellMultiLine = Infragistics.Win.DefaultableBoolean.True;
ultraGrid1.DisplayLayout.Bands[
0].Columns["备注"].VertScrollBar = true;
ultraGrid1.DisplayLayout.Override.DefaultRowHeight 
= 45;

 这种方法使每行的高度都是固定的,所以可能会有个别备注仍然无法在界面上直接显示所有内容,需要下来滚动条才能看到下面的内容。但这样可以使界面看起来更美观和规格统一。

你可以把鼠标放在备注字段上,不点击,可以看到一个浮动窗口显示备注中的所有内容。实际上如果不需要复制或者在界面上修改备注内容,而只是查看备注中的内容,这个小功能还是很好用的。

参考:http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.Aspx?ArticleID=1043