|
|
|
|
|
|
|
在 WebForm 的 DadaGrid 中显示图象1 |
|
|
|
DadaGrid 是 ASP.NET 编程中一个很重要的控件,其优良的可定制功能为提高它的表现力提供了极大的方便。除了与数据源直接绑定以外,我们还可以通过列绑定模板对 DataGrid 的列进行自定义,来按照我们设定的格式显示数据。 例如,数据表中有一个字段 f_DemoImage 用来存放图片的路径(包括图片文件名),为了在 DataGrid 的 Cell 中显示实际的图片,我们可以定义一个模板列,然后给该列赋予字段 f_DemoImage 的值,就可以在 DataGrid 的 Cell 中显示图片。 WebForm1.aspx 文件: <%@ Page language="c#" Codebehind="Wizard_select_template.aspx.cs" AutoEventWireup="false" Inherits="WebHatcher.WebForm1" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <HTML> <HEAD> <title>WebForm1&l页码:[1] [2] [3] [4] [5] [6] [7] [8] 第1页、共8页 |
|
|
|
|
设为首页 | 加入收藏 | 广告服务 | 友情链接 | 版权申明
Copyriht 2007 - 2008 © 科普之友 All right reserved |