当前位置:首页 » 编程博文
开发技术指南» 文章正文
    引言: 下文将为您演示如何将DataGrid实现为一个立体的表格,以及
 

 

 ·rfc1827 中文版    »显示摘要«
    摘要:组织:中国互动出版网(http://www.china-pub.com/)rfc文档中文翻译计划(http://www.china-pub.com/compters/emook/aboutemook.htm)e-mail:ouyang@china-pub.com译者:piex(piex jintao@bigfoot.com)译文发布时间:2002-01-18版权:本中文翻译文档版权归中国互动出版网......
    摘要: // // using system; // using system.io; // /// <summary> /// temporary storage. /// </summary> private string buffer; /// <summary> /// write base64 str......


如何实现立体的DataGrid和具有Windows效果的图片按钮
    下文将为您演示如何将datagrid实现为一个立体的表格,以及如何实现在image按钮中实现立体感的效果.为了完成上面的内容我们首先要对css的自定义样式有所了解,然后就是一些简单的js代码.

<asp:datagrid id="datagrid1" runat="server" gridlines="horizontal" style="border-collapse:separate"> 【程序编程相关:常见硬件术语手册!绝对权威!(转!)十、

为了实现立体大datagrid我们需要创建一个工程,里面有一个datagrid以及绑定在其上的数据,代码如下: 【推荐阅读:常见硬件术语手册!绝对权威!(转!)九、

</asp:datagrid> 【扩展信息:常见硬件术语手册!绝对权威!(转!)十一

         <itemstyle ></itemstyle>

上面的代码中有一个地方非常重要,就是设置style的属性那里,记得一定要写成这样.有了这个数据网格以后我们需要写一个可以实现立体效果的css样式,css样式如下所示:

<style>

.soliddatagrid{ 

       coolsoliddatagrid:expression(applysolidtable(this));

       border-color:#ffffff;

       border-bottom-width:0px;

       border-left-width:0px;

       border-right-width:0px;

       border-top-width:0px;

}

.soliddatagriditem{ 

       coolsoliddatagridrow:expression(applysolidtr(this));

}

</style>

从代码中我们可以看到使用了自定义的样式,该样式使用js来实现的,所以我们还要有下面的js代码来支持上面的css样式.js代码如下所示:

<script language="javascript">

function applysolidtable(obj){

       obj.cellpadding = "0px";

       obj.cellspacing = "0px";


...   下一页
 ·google搜索的统计    »显示摘要«
    摘要:google zeitgeist - search patterns, trends, and surprises according to google 是google根据google.com的搜索内容整理的统计结果。按照google的说法对搜索的分析能看出人们的兴趣趋势、模式和有些意外。“for both breaking news and obscure informati......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE