龍騎少校

玩的就是技术。ko!!!
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

ASP.NET 2.0中合并 GridView 的表头单元格

Posted on 2008-11-06 23:13  龍騎少校  阅读(255)  评论(0编辑  收藏  举报

在实际工作中,往往需要合并表格头部的单元格,下面就是一个实现的例子。运行结果如图:

 

Code

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>合并 GridView 的表头单元格</title>
</head>
<body>
  <form id="Form1" runat="server">
    <asp:GridView ID="GridView1" runat="server" CellSpacing="1" CellPadding="3"
      Font-Size="12px" Width="300px" BackColor="orange" BorderWidth="0"
      OnRowDataBound="GridView1_RowDataBound" OnRowCreated="GridView1_RowCreated">
    </asp:GridView>
  </form>
</body>
</html>