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

推荐订阅源

S
Secure Thoughts
S
Securelist
P
Proofpoint News Feed
D
DataBreaches.Net
Cisco Talos Blog
Cisco Talos Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Project Zero
Project Zero
A
About on SuperTechFans
罗磊的独立博客
WordPress大学
WordPress大学
月光博客
月光博客
Latest news
Latest news
C
Cyber Attacks, Cyber Crime and Cyber Security
GbyAI
GbyAI
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
博客园 - 三生石上(FineUI控件)
F
Fortinet All Blogs
W
WeLiveSecurity
Attack and Defense Labs
Attack and Defense Labs
V
Visual Studio Blog
Blog — PlanetScale
Blog — PlanetScale
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
P
Privacy International News Feed
AI
AI
博客园 - 司徒正美
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Stack Overflow Blog
Stack Overflow Blog
M
MIT News - Artificial intelligence
Help Net Security
Help Net Security
T
Tor Project blog
V
Vulnerabilities – Threatpost
C
Cisco Blogs
I
Intezer
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
MyScale Blog
MyScale Blog
雷峰网
雷峰网
MongoDB | Blog
MongoDB | Blog
Forbes - Security
Forbes - Security
V
V2EX
Apple Machine Learning Research
Apple Machine Learning Research
T
Threat Research - Cisco Blogs
B
Blog RSS Feed
博客园 - 叶小钗
N
News and Events Feed by Topic
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Simon Willison's Weblog
Simon Willison's Weblog
C
CERT Recently Published Vulnerability Notes
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
N
News and Events Feed by Topic

博客园 - 白水书生

招聘.net开发工程师(1人) 有效期2005年7月底 无法在web服务器上启动调试 HTTP/1.0 503 FlexCell表格控件For .NET V1.0.6 BLOG集锦 Mobile P 4和Mobile P4 M 奥运开始了!!!!! SQL Server的系统表 解决编写导入dBase存储过程的遇到的问题 项目实施有感 问题多多!!盼高手啊!!! 今天遇到一个奇怪的问题!!无奈搞了半天也没解决,难道非要重装 周日加班!无奈中就自己炫耀一下!!! 都是IE 缓存惹的祸!! 2004年度北京八大手机集散地大巡礼 Reporting Services 出书了!!! 解决报表部署时数据源存在不能替换的问题 [转]北京好吃地点大全 2004年5月版 如何知道自己的计算机是否安装了.Net Framework 1.1
控制DataGrid里的内容换行与不换行 - 白水书生 - 博客园
白水书生 · 2004-08-18 · via 博客园 - 白水书生

//换行
DataGrid1.Attributes.Add("style","word-break:keep-all;word-wrap:normal");
当内容为数字 ,则必须
void DataGrid1_DataBound(Object sender, DataGridItemEventArgs e)
{
  if( e.Item.ItemType == ListItemType.Item ||
    e.Item.ItemType == ListItemType.AlternatingItem)
   e.Item.Cells[1].Text = "<nobr>" + e.Item.Cells[1].Text + "</nobr>";
}

或者
private void DataGrid1_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
  {
   if(e.Item.ItemType ==ListItemType.Header||e.Item .ItemType==ListItemType.Item ||e.Item .ItemType ==ListItemType.AlternatingItem)
   {
    for(int i=0;i<e.Item .Cells .Count ;i++)
    {
     e.Item .Cells [i].Attributes .Add ("nowrap","nowrap");
    }
   }
  }
 
//自动换行
DataGrid1.Attributes.Add("style","word-break:break-all;word-wrap:break-word");