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

推荐订阅源

博客园 - 三生石上(FineUI控件)
Hugging Face - Blog
Hugging Face - Blog
M
MIT News - Artificial intelligence
T
Tailwind CSS Blog
Webroot Blog
Webroot Blog
S
Secure Thoughts
N
News and Events Feed by Topic
月光博客
月光博客
TaoSecurity Blog
TaoSecurity Blog
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog RSS Feed
N
News | PayPal Newsroom
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
小众软件
小众软件
Recent Commits to openclaw:main
Recent Commits to openclaw:main
P
Privacy & Cybersecurity Law Blog
GbyAI
GbyAI
K
Kaspersky official blog
WordPress大学
WordPress大学
P
Proofpoint News Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
博客园 - 叶小钗
W
WeLiveSecurity
Jina AI
Jina AI
The Cloudflare Blog
Project Zero
Project Zero
Simon Willison's Weblog
Simon Willison's Weblog
V
Vulnerabilities – Threatpost
L
LangChain Blog
Forbes - Security
Forbes - Security
PCI Perspectives
PCI Perspectives
Engineering at Meta
Engineering at Meta
Google DeepMind News
Google DeepMind News
Recorded Future
Recorded Future
博客园 - 【当耐特】
H
Heimdal Security Blog
A
About on SuperTechFans
Cisco Talos Blog
Cisco Talos Blog
T
Threat Research - Cisco Blogs
云风的 BLOG
云风的 BLOG
Spread Privacy
Spread Privacy
L
LINUX DO - 最新话题
L
Lohrmann on Cybersecurity
Last Week in AI
Last Week in AI
Google DeepMind News
Google DeepMind News
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
I
Intezer
Martin Fowler
Martin Fowler
S
Securelist
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint

博客园 - 一个春天

用ASP.NET 2.0实现AJAX风格的Web开发 Web2.0时代,RSS你会用了吗? web2.0开源代码 Web 2.0 编程思想:16条法则 Web2.0简介 解读Web 2.0流行词 什么是RSS? Web 2.0学习指南 什么是Web 2.0 biztalk中调用.NET类 C#创建快捷方式 获得Windows中系统特殊文件夹的位置 ADO.NET中连接池状态的跟踪 NET Framework的安装 DataGrid常见问题 User Control事件无法触发? ASP.NET中动态创建DataGrid的模板列 Dispose模式 关于ASP.NET程序的发布
DataGrid列宽度设置
一个春天 · 2004-05-22 · via 博客园 - 一个春天

浏览状态下的列宽度可以这样设置:
Column.ItemStyle.Width = 100;

编辑状态下的列宽度可以这样设置:

private void DataGrid1_EditCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
    DataGridItem line = dbgCustomers.Items[e.Item.ItemIndex];
    TextBox tb1 = (TextBox)line.Cells[0].Controls[0];
    TextBox tb2 = (TextBox)line.Cells[1].Controls[0];

    tb1.Width = Unit.Percentage(100);
    tb2.Width = Unit.Percentage(100);
    tb2.TextMode = TextBoxMode.MultiLine;
}


参见:
http://msmvps.com/montaque/posts/5353.aspx

posted on 2004-05-22 12:55  一个春天  阅读(3194)  评论(0)    收藏  举报