帝国软件
  设为首页 加入收藏 关于我们
 
解密帝国网站管理系统
栏 目:
 
您的位置:首页 > 技术文档 > ASP.NET编程
BoundColumn
作者:佚名 发布时间:2005-04-02 来源:不详
 


BoundColumn 最主要的功能是利用Label 来显示数据源中的一个字段内容,其使用语法如下所示:

<ASP:BoundColumn
DataField="DataSourceField"
DataFormatString="FormatString"
FooterText="FooterText"
HeaderImageUrl="url"
HeaderText="HeaderText"
ReadOnly="True | False"
SortField="DataSourceFieldToSortBy"
Visible="True | False"
FooterStyle-Property="value"
HeaderStyle-Property="value"
ItemStyle-Property="value"
/>

其中除了共同基础属性以及样式对象外,常用的属性如下表所示:

下列程序代码片段以BoundColumn 来显示字段内容:

<ASP:DataGrid Id="dgA" AllowPaging="True" PageSize="5"
OnPageIndexChanged="dgA_PageChg" Runat="Server"
PagerStyle-Mode="NumericPages" BorderColor="#808080"
HeaderStyle-Font-Names="Courier New"
HeaderStyle-BackColor="#D1DCEB"
AutoGenerateColumns="False">
<Property Name="Columns">
<ASP:BoundColumn
HeaderText="姓名"
HeaderStyle-Font-Bold="True"
HeaderStyle-HorizontalAlign="Center"
DataField="UserName"/>
<ASP:BoundColumn
HeaderText="电话"
HeaderStyle-Font-Bold="True"
HeaderStyle-HorizontalAlign="Center"
DataField="UserTel"/>
<ASP:BoundColumn
HeaderText="住址"
HeaderStyle-Font-Bold="True"
HeaderStyle-HorizontalAlign="Center"
DataField="UserAdd"/>
</Property>
</ASP:DataGrid>


 
 
  
评论】【加入收藏夹】【 】【打印】【关闭
※ 相关链接
 ·JScript 方法 - lbound 方法  (2005-03-12)

   栏目导行
  PHP编程
  ASP编程
  ASP.NET编程
  JAVA编程
   站点最新
·致合作伙伴的欢迎信
·媒体报道
·帝国软件合作伙伴计划协议
·DiscuzX2.5会员整合通行证发布
·帝国CMS 7.0版本功能建议收集
·帝国网站管理系统2012年授权购买说
·PHPWind8.7会员整合通行证发布
·[官方插件]帝国CMS-访问统计插件
·[官方插件]帝国CMS-sitemap插件
·[官方插件]帝国CMS内容页评论AJAX分
   类别最新
·ASP.NET中为DataGrid添加合计字段
·.text urlRewrite介绍
·利用 ASP.NET 的内置功能抵御 Web
·ASP.NET Cache
·用 WebClient.UploadData 方法 上载
·ASP.NET 程序设计-序
·什么是客户端/伺服端(Client/Serve
·因特网应用程序的开发
·网页的种类
·.NET Framework-Microsoft Visual
 
关于帝国 | 广告服务 | 联系我们 | 程序开发 | 网站地图 | 留言板 帝国网站管理系统