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

推荐订阅源

aimingoo的专栏
aimingoo的专栏
B
Blog RSS Feed
Recent Announcements
Recent Announcements
Vercel News
Vercel News
M
MIT News - Artificial intelligence
阮一峰的网络日志
阮一峰的网络日志
L
LangChain Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Security Blog
Microsoft Security Blog
H
Help Net Security
T
The Blog of Author Tim Ferriss
Y
Y Combinator Blog
G
Google Developers Blog
罗磊的独立博客
爱范儿
爱范儿
宝玉的分享
宝玉的分享
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园_首页
S
SegmentFault 最新的问题
WordPress大学
WordPress大学
月光博客
月光博客
人人都是产品经理
人人都是产品经理
Apple Machine Learning Research
Apple Machine Learning Research

博客园 - shipfi

CMarkup的改进 - shipfi - 博客园 asp.net中的AJAX编程-异步网络调用 asp.net中的AJAX编程-Ajax服务器扩展 asp.net中的AJAX编程-Javascript语法补充 asp.net中的AJAX编程-ASP.NET AJAX框架 asp.net问题点集合 asp.net学习之ado.net(无连接模式中的DataAdapter) asp.net学习之ado.net(连接模式访问) asp.net学习之DataList控件 asp.net学习之Repeater控件 asp.net学习之GridView事件、GridViewRow对象 asp.net学习之GridView七种字段 asp.net学习之GridView asp.net学习之再论sqlDataSource asp.net学习之SqlDataSource asp.net学习之 数据绑定控件--表格绑定控件 asp.net学习之 数据绑定控件--List数据绑定控件 asp.net学习之数据绑定控件、数据源控件概述 理解T-SQL: 存储过程 - shipfi - 博客园
asp.net学习之扩展GridView
shipfi · 2009-10-18 · via 博客园 - shipfi

   本节讨论如何从现有的控件,进而扩展成强大的,更定制的GridView控件

1.扩展BoundField

       默认的BoundField不能显示多文本,文字一多,就会扩大整个Table的Height值,解决这个问题的方法可以通过TemplateField加入Div控件来解决,但是,也可以从BoundField类上进行扩展,加入一点特有的功能,让他能够显示多文本
例1: 创建长文本字段
===App_code\myControls.cs===

Code

===custer_list.aspx===

Code

2.扩展ButtonField

    扩充的ButtonField能够具有警告作用,即在点击时能够弹出确认消息。
例2:扩展ButtonField字段

Code

3.待续…